mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
PM / Runtime: Add macro to test for runtime PM events
This patch (as1482) adds a macro for testing whether or not a pm_message value represents an autosuspend or autoresume (i.e., a runtime PM) event. Encapsulating this notion seems preferable to open-coding the test all over the place. Signed-off-by: Alan Stern <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
311aab73d2
commit
5b1b0b812a
15 changed files with 32 additions and 32 deletions
|
|
@ -439,10 +439,10 @@ cause autosuspends to fail with -EBUSY if the driver needs to use the
|
|||
device.
|
||||
|
||||
External suspend calls should never be allowed to fail in this way,
|
||||
only autosuspend calls. The driver can tell them apart by checking
|
||||
the PM_EVENT_AUTO bit in the message.event argument to the suspend
|
||||
method; this bit will be set for internal PM events (autosuspend) and
|
||||
clear for external PM events.
|
||||
only autosuspend calls. The driver can tell them apart by applying
|
||||
the PMSG_IS_AUTO() macro to the message argument to the suspend
|
||||
method; it will return True for internal PM events (autosuspend) and
|
||||
False for external PM events.
|
||||
|
||||
|
||||
Mutual exclusion
|
||||
|
|
|
|||
Loading…
Reference in a new issue