public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM: runtime: add missed pm_request_autosuspend
@ 2010-09-27 10:54 tom.leiming
  2010-09-27 13:54 ` Alan Stern
  0 siblings, 1 reply; 5+ messages in thread
From: tom.leiming @ 2010-09-27 10:54 UTC (permalink / raw)
  To: rjw, stern; +Cc: linux-pm

From: Ming Lei <tom.leiming@gmail.com>

Commit 5789bdd542c6bfbb662915c67bffc14198aa5dda
[PM / Runtime: Implement autosuspend support] introduces
"autosuspend" facility for runtime PM, but misses
helper function of pm_request_autosuspend, so add it.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 include/linux/pm_runtime.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 99ed1aa..3ec2358 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -164,6 +164,11 @@ static inline int pm_request_resume(struct device *dev)
 	return __pm_runtime_resume(dev, RPM_ASYNC);
 }
 
+static inline int pm_request_autosuspend(struct device *dev)
+{
+	return __pm_runtime_suspend(dev, RPM_ASYNC | RPM_AUTO);
+}
+
 static inline int pm_runtime_get(struct device *dev)
 {
 	return __pm_runtime_resume(dev, RPM_GET_PUT | RPM_ASYNC);
-- 
1.6.2.5

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

end of thread, other threads:[~2010-09-28 22:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-27 10:54 [PATCH] PM: runtime: add missed pm_request_autosuspend tom.leiming
2010-09-27 13:54 ` Alan Stern
2010-09-27 14:28   ` Ming Lei
2010-09-27 14:41     ` Alan Stern
2010-09-28 22:14       ` 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