]> err.no Git - linux-2.6/commit
power management: implement pm_ops.valid for everybody
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 30 Apr 2007 22:09:54 +0000 (15:09 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 30 Apr 2007 23:40:40 +0000 (16:40 -0700)
commite8c9c502690efd24b7055bf608e7a3c34216848b
tree1583f34ec9cac07ddfdcb24de66e49718b107436
parent11d77d0c01b80e44c7aceb21928508dafce774f9
power management: implement pm_ops.valid for everybody

Almost all users of pm_ops only support mem sleep, don't check in .valid and
don't reject any others in .prepare so users can be confused if they check
/sys/power/state, especially when new states are added (these would then
result in s-t-r although they're supposed to be something different).

This patch implements a generic pm_valid_only_mem function that is then
exported for users and puts it to use in almost all existing pm_ops.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: linux-pm@lists.linux-foundation.org
Cc: Len Brown <lenb@kernel.org>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/arm/common/sharpsl_pm.c
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap2/pm.c
arch/arm/mach-pnx4008/pm.c
arch/arm/mach-pxa/pm.c
arch/arm/mach-sa1100/pm.c
arch/arm/plat-s3c24xx/pm.c
arch/sh/boards/hp6xx/pm.c
drivers/acpi/sleep/main.c
include/linux/pm.h
kernel/power/main.c