diff options
author | David Brownell <david-b@pacbell.net> | 2006-08-15 02:11:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-26 00:08:37 -0400 |
commit | 8b4b8a24e4e49dc9fe36d4d079f6d2c23f942b03 (patch) | |
tree | f8c2a452bff75b013182dd90996eef0aa760042c /drivers/media/dvb/cinergyT2 | |
parent | 8f4bcc20ee39f9c087f3532672e3e5f086e92281 (diff) |
fix broken/dubious driver suspend() methods
Small driver suspend() fixes in preparation for the PRETHAW events:
- Only compare message events for equality against PM_EVENT_* codes;
not against integers, or using greater/less-than comparisons.
(PM_EVENT_* should really become a __bitwise thing.)
- Explicitly test for SUSPEND events (rather than not-something-else)
before suspending devices.
- Removes more of the confusion between a pm_message_t (wraps event code)
and a "state" ... suspend() originally took a target system state.
These updates are correct and appropriate even without new PM_EVENT codes.
benh: "I think in the Mesh case, we should handle the freeze case as well or
we might get wild DMA."
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Greg KH <greg@kroah.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/media/dvb/cinergyT2')
-rw-r--r-- | drivers/media/dvb/cinergyT2/cinergyT2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index 001c71b6be61..410fa6d620ff 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c | |||
@@ -981,7 +981,7 @@ static int cinergyt2_suspend (struct usb_interface *intf, pm_message_t state) | |||
981 | if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->sem)) | 981 | if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->sem)) |
982 | return -ERESTARTSYS; | 982 | return -ERESTARTSYS; |
983 | 983 | ||
984 | if (state.event > PM_EVENT_ON) { | 984 | if (1) { |
985 | struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf); | 985 | struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf); |
986 | 986 | ||
987 | cinergyt2_suspend_rc(cinergyt2); | 987 | cinergyt2_suspend_rc(cinergyt2); |