summaryrefslogtreecommitdiffstats
path: root/drivers/base/power/wakeup.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-01-02 01:42:56 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-01-03 00:29:30 +0100
commit9dbc64a5d5938b990a045509ff5356fc53e4abd4 (patch)
treee43a8115dd15e86a571516aa5fc20fe4b043f5e6 /drivers/base/power/wakeup.c
parentPM / wakeup: Drop redundant check from device_set_wakeup_enable() (diff)
downloadlinux-9dbc64a5d5938b990a045509ff5356fc53e4abd4.tar.xz
linux-9dbc64a5d5938b990a045509ff5356fc53e4abd4.zip
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/power/wakeup.c')
-rw-r--r--drivers/base/power/wakeup.c4
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);
}