aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2011-08-19 17:49:48 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-08-19 17:49:48 -0400
commit5b1b0b812a7b1a5b968c5d06d90d1cb88621b941 (patch)
treedd57943592e4152147d1a5667b082e5f30faaf83 /drivers/net/wimax
parent311aab73d273eb22be976055f6cab224f7279d5e (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 'drivers/net/wimax')
-rw-r--r--drivers/net/wimax/i2400m/usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers/net/wimax/i2400m/usb.c
index 298f2b0b631..9a644d052f1 100644
--- a/drivers/net/wimax/i2400m/usb.c
+++ b/drivers/net/wimax/i2400m/usb.c
@@ -599,7 +599,7 @@ void i2400mu_disconnect(struct usb_interface *iface)
599 * 599 *
600 * As well, the device might refuse going to sleep for whichever 600 * As well, the device might refuse going to sleep for whichever
601 * reason. In this case we just fail. For system suspend/hibernate, 601 * reason. In this case we just fail. For system suspend/hibernate,
602 * we *can't* fail. We check PM_EVENT_AUTO to see if the 602 * we *can't* fail. We check PMSG_IS_AUTO to see if the
603 * suspend call comes from the USB stack or from the system and act 603 * suspend call comes from the USB stack or from the system and act
604 * in consequence. 604 * in consequence.
605 * 605 *
@@ -615,7 +615,7 @@ int i2400mu_suspend(struct usb_interface *iface, pm_message_t pm_msg)
615 struct i2400m *i2400m = &i2400mu->i2400m; 615 struct i2400m *i2400m = &i2400mu->i2400m;
616 616
617#ifdef CONFIG_PM 617#ifdef CONFIG_PM
618 if (pm_msg.event & PM_EVENT_AUTO) 618 if (PMSG_IS_AUTO(pm_msg))
619 is_autosuspend = 1; 619 is_autosuspend = 1;
620#endif 620#endif
621 621