diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2010-09-25 23:35:00 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2010-10-17 01:57:46 +0200 |
commit | 1bfee5bc86fdaecc912e06080583eddab7263df2 (patch) | |
tree | 1f1b0f5ff1b9b7a5eed1ccd62de1d8ffb37f2ea3 /include/linux/pm_runtime.h | |
parent | 3f9af0513ae5b1f185302c2d0ba656640926d970 (diff) | |
download | blackbird-op-linux-1bfee5bc86fdaecc912e06080583eddab7263df2.tar.gz blackbird-op-linux-1bfee5bc86fdaecc912e06080583eddab7263df2.zip |
PM / Runtime: Merge synchronous and async runtime routines
This patch (as1423) merges the asynchronous routines
__pm_request_idle(), __pm_request_suspend(), and __pm_request_resume()
with their synchronous counterparts. The RPM_ASYNC bitflag argument
serves to indicate what sort of operation to perform.
In the course of performing this merger, it became apparent that the
various functions don't all behave consistenly with regard to error
reporting and cancellation of outstanding requests. A new routine,
rpm_check_suspend_allowed(), was written to centralize much of the
testing, and the other functions were revised to follow a simple
algorithm:
If the operation is disallowed because of the device's
settings or current state, return an error.
Cancel pending or scheduled requests of lower priority.
Schedule, queue, or perform the desired operation.
A few special cases and exceptions are noted in comments.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm_runtime.h')
0 files changed, 0 insertions, 0 deletions