diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2011-08-19 17:49:48 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-08-19 17:49:48 -0400 |
commit | 5b1b0b812a7b1a5b968c5d06d90d1cb88621b941 (patch) | |
tree | dd57943592e4152147d1a5667b082e5f30faaf83 /Documentation/usb | |
parent | 311aab73d273eb22be976055f6cab224f7279d5e (diff) |
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 <stern@rowland.harvard.edu>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'Documentation/usb')
-rw-r--r-- | Documentation/usb/power-management.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index c9ffa9ced7ee..e8662a5fbc5d 100644 --- a/Documentation/usb/power-management.txt +++ b/Documentation/usb/power-management.txt | |||
@@ -439,10 +439,10 @@ cause autosuspends to fail with -EBUSY if the driver needs to use the | |||
439 | device. | 439 | device. |
440 | 440 | ||
441 | External suspend calls should never be allowed to fail in this way, | 441 | External suspend calls should never be allowed to fail in this way, |
442 | only autosuspend calls. The driver can tell them apart by checking | 442 | only autosuspend calls. The driver can tell them apart by applying |
443 | the PM_EVENT_AUTO bit in the message.event argument to the suspend | 443 | the PMSG_IS_AUTO() macro to the message argument to the suspend |
444 | method; this bit will be set for internal PM events (autosuspend) and | 444 | method; it will return True for internal PM events (autosuspend) and |
445 | clear for external PM events. | 445 | False for external PM events. |
446 | 446 | ||
447 | 447 | ||
448 | Mutual exclusion | 448 | Mutual exclusion |