From: David Brownell Date: Tue, 15 Aug 2006 06:11:03 +0000 (-0700) Subject: fix broken/dubious driver suspend() methods X-Git-Tag: v2.6.19-rc1~1078^2~35 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b4b8a24e4e49dc9fe36d4d079f6d2c23f942b03;p=pandora-kernel.git 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 Acked-by: Pavel Machek Cc: Greg KH Cc: Paul Mackerras Acked-by: Benjamin Herrenschmidt Cc: Mauro Carvalho Chehab Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed