From f5b559da3979e3fba268f45c0dc99ffc4a0c1a9e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 4 Oct 2006 10:45:05 -0300 Subject: fix broken/dubious driver suspend() methods From: Mauro Carvalho Chehab Applied the rellevant v4l-dvb part of this patch from David Brownell kernel-sync: Original description: 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: Mauro Carvalho Chehab --- linux/drivers/media/dvb/cinergyT2/cinergyT2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c index 48569a792..5964b27f9 100644 --- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c @@ -1001,7 +1001,7 @@ static int cinergyt2_suspend (struct usb_interface *intf, pm_message_t state) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) if (state > 0) { #else - if (state.event > PM_EVENT_ON) { + if (1) { #endif struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf); -- cgit v1.2.3