diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-12-26 01:50:20 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-01-03 00:28:39 +0100 |
commit | d97c2e0d635e39b5b63784deb3212e846ebf76dc (patch) | |
tree | a967b32a2d9733b6b6d3029fc81b2543dd940ab6 | |
parent | 86ddd2db1f75a30f21a4c4de7a29249ee8c37ed8 (diff) | |
download | linux-d97c2e0d635e39b5b63784deb3212e846ebf76dc.tar.bz2 |
PM / wakeup: Drop redundant check from device_set_wakeup_enable()
Since both device_wakeup_enable() and device_wakeup_disable() check
if dev is not NULL and whether or not power.can_wakeup is set for it,
device_set_wakeup_enable() doesn't have to do that, so drop that
check from it.
No intentional changes in functionality.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/base/power/wakeup.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index cb72965b3281..90c7212de087 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -464,9 +464,6 @@ EXPORT_SYMBOL_GPL(device_init_wakeup); */ int device_set_wakeup_enable(struct device *dev, bool enable) { - if (!dev || !dev->power.can_wakeup) - return -EINVAL; - return enable ? device_wakeup_enable(dev) : device_wakeup_disable(dev); } EXPORT_SYMBOL_GPL(device_set_wakeup_enable); |