diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2011-08-19 23:49:48 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-08-19 23:49:48 +0200 |
commit | 5b1b0b812a7b1a5b968c5d06d90d1cb88621b941 (patch) | |
tree | dd57943592e4152147d1a5667b082e5f30faaf83 /drivers/usb/serial/sierra.c | |
parent | 311aab73d273eb22be976055f6cab224f7279d5e (diff) | |
download | blackbird-op-linux-5b1b0b812a7b1a5b968c5d06d90d1cb88621b941.tar.gz blackbird-op-linux-5b1b0b812a7b1a5b968c5d06d90d1cb88621b941.zip |
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 'drivers/usb/serial/sierra.c')
-rw-r--r-- | drivers/usb/serial/sierra.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index d5d136a53b61..b18179bda0d8 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -1009,7 +1009,7 @@ static int sierra_suspend(struct usb_serial *serial, pm_message_t message) struct sierra_intf_private *intfdata; int b; - if (message.event & PM_EVENT_AUTO) { + if (PMSG_IS_AUTO(message)) { intfdata = serial->private; spin_lock_irq(&intfdata->susp_lock); b = intfdata->in_flight; |