]> Git Repo - linux.git/commit - drivers/ide/pmac.c
fix broken/dubious driver suspend() methods
authorDavid Brownell <[email protected]>
Tue, 15 Aug 2006 06:11:03 +0000 (23:11 -0700)
committerGreg Kroah-Hartman <[email protected]>
Tue, 26 Sep 2006 04:08:37 +0000 (21:08 -0700)
commit8b4b8a24e4e49dc9fe36d4d079f6d2c23f942b03
treef8c2a452bff75b013182dd90996eef0aa760042c
parent8f4bcc20ee39f9c087f3532672e3e5f086e92281
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 <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Paul Mackerras <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: James Bottomley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/ide/ppc/pmac.c
drivers/media/dvb/cinergyT2/cinergyT2.c
drivers/scsi/mesh.c
This page took 0.054206 seconds and 4 git commands to generate.