mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -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
|
|
@ -1103,7 +1103,7 @@ static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
|
|||
return 0;
|
||||
|
||||
spin_lock_irq(&data->txlock);
|
||||
if (!((message.event & PM_EVENT_AUTO) && data->tx_in_flight)) {
|
||||
if (!(PMSG_IS_AUTO(message) && data->tx_in_flight)) {
|
||||
set_bit(BTUSB_SUSPENDING, &data->flags);
|
||||
spin_unlock_irq(&data->txlock);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue