PM: runtime: add missed pm_request_autosuspend
authorMing Lei <tom.leiming@gmail.com>
Tue, 28 Sep 2010 22:12:22 +0000 (00:12 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sat, 16 Oct 2010 23:57:48 +0000 (01:57 +0200)
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>
include/linux/pm_runtime.h

index 99ed1aa8f933ee7e7794943969e6c55755901e42..3ec2358f8692d11027e6af927402fcbc0f039da2 100644 (file)
@@ -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);