Skip to content

Commit

Permalink
PM: runtime: add missed pm_request_autosuspend
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ming Lei authored and Rafael J. Wysocki committed Oct 16, 2010
1 parent d0941ea commit 5fc62aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/linux/pm_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5fc62aa

Please sign in to comment.