mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PM / Sleep: Remove pm_runtime_suspended() from __pm_generic_call()
@ 2011-11-17 23:37 Rafael J. Wysocki
  2011-11-27 12:41 ` [PATCH] PM / Sleep: Simplify generic system suspend callbacks Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2011-11-17 23:37 UTC (permalink / raw)
  To: Linux PM list; +Cc: LKML

From: Rafael J. Wysocki <rjw@sisk.pl>

The pm_runtime_suspended() check in __pm_generic_call() doesn't
really help and may cause problems to happen, because in some cases
the system suspend callbacks need to be called even if the given
device has been suspended by runtime PM.  For example, if the device
generally supports remote wakeup and is not enabled to wake up
the system from sleep, it should be prevented from generating wakeup
signals during system suspend and that has to be done by the
suspend callbacks that the pm_runtime_suspended() check prevents from
being executed.  For this reason, remove the pm_runtime_suspended()
check from __pm_generic_call().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/base/power/generic_ops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/base/power/generic_ops.c
===================================================================
--- linux.orig/drivers/base/power/generic_ops.c
+++ linux/drivers/base/power/generic_ops.c
@@ -106,7 +106,7 @@ static int __pm_generic_call(struct devi
 	const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
 	int (*callback)(struct device *);
 
-	if (!pm || pm_runtime_suspended(dev))
+	if (!pm)
 		return 0;
 
 	switch (event) {

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-14 23:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-17 23:37 [PATCH] PM / Sleep: Remove pm_runtime_suspended() from __pm_generic_call() Rafael J. Wysocki
2011-11-27 12:41 ` [PATCH] PM / Sleep: Simplify generic system suspend callbacks Rafael J. Wysocki
2011-12-09 23:05   ` Rafael J. Wysocki
2011-12-14 23:19     ` [PATCH 0/2 v2] " Rafael J. Wysocki
2011-12-14 23:20       ` [PATCH 1/2 " Rafael J. Wysocki
2011-12-14 23:21       ` [PATCH 2/2 v2] PM / Sleep: Merge internal functions in generic_ops.c Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®