diff options
author | Rafael J. Wysocki | 2018-01-02 01:42:56 +0100 |
---|---|---|
committer | Rafael J. Wysocki | 2018-01-03 00:29:30 +0100 |
commit | 9dbc64a5d5938b990a045509ff5356fc53e4abd4 (patch) | |
tree | e43a8115dd15e86a571516aa5fc20fe4b043f5e6 /drivers/base | |
parent | d97c2e0d635e39b5b63784deb3212e846ebf76dc (diff) |
PM / wakeup: Drop redundant check from device_init_wakeup()
Since device_wakeup_disable() checks the device's power.can_wakeup
flag, device_init_wakeup() doesn't need to do that before calling it,
so drop that redundant check from device_init_wakeup().
No intentional changes in functionality.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/wakeup.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 90c7212de087..b7b8b2fe89c6 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -448,9 +448,7 @@ int device_init_wakeup(struct device *dev, bool enable) device_set_wakeup_capable(dev, true); ret = device_wakeup_enable(dev); } else { - if (dev->power.can_wakeup) - device_wakeup_disable(dev); - + device_wakeup_disable(dev); device_set_wakeup_capable(dev, false); } |