aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_runtime.h
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2010-09-28 18:12:22 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2010-10-16 19:57:48 -0400
commit5fc62aad4e7779c2f04691e48b351d08c050c1f1 (patch)
tree913f810f73bf5042a96f862efe9e97b0d26405ad /include/linux/pm_runtime.h
parentd0941ead3fdd31aafff992d211bcefdbff1eaedb (diff)
PM: runtime: add missed pm_request_autosuspend
The patch "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> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r--include/linux/pm_runtime.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 99ed1aa8f933..3ec2358f8692 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)
164 return __pm_runtime_resume(dev, RPM_ASYNC); 164 return __pm_runtime_resume(dev, RPM_ASYNC);
165} 165}
166 166
167static inline int pm_request_autosuspend(struct device *dev)
168{
169 return __pm_runtime_suspend(dev, RPM_ASYNC | RPM_AUTO);
170}
171
167static inline int pm_runtime_get(struct device *dev) 172static inline int pm_runtime_get(struct device *dev)
168{ 173{
169 return __pm_runtime_resume(dev, RPM_GET_PUT | RPM_ASYNC); 174 return __pm_runtime_resume(dev, RPM_GET_PUT | RPM_ASYNC);