projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2867e0
)
PM: Use pm_wakeup_pending() in __device_suspend()
author
Rafael J. Wysocki
<rjw@sisk.pl>
Fri, 3 Dec 2010 22:14:26 +0000
(23:14 +0100)
committer
Rafael J. Wysocki
<rjw@sisk.pl>
Fri, 24 Dec 2010 14:02:42 +0000
(15:02 +0100)
Before starting to suspend a device in __device_suspend() check if
there's a request to abort the power transition and return -EBUSY
in that case.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/power/main.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/base/power/main.c
b/drivers/base/power/main.c
index 8a5258339ca2c45d6d097d4a14ab1cfd721694b2..fb4ca2870081b46b1a97240b21cab801809ed246 100644
(file)
--- a/
drivers/base/power/main.c
+++ b/
drivers/base/power/main.c
@@
-877,6
+877,11
@@
static int __device_suspend(struct device *dev, pm_message_t state, bool async)
if (async_error)
goto End;
+ if (pm_wakeup_pending()) {
+ async_error = -EBUSY;
+ goto End;
+ }
+
if (dev->class) {
if (dev->class->pm) {
pm_dev_dbg(dev, state, "class ");