diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-04-30 18:09:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 19:40:40 -0400 |
commit | e8c9c502690efd24b7055bf608e7a3c34216848b (patch) | |
tree | 1583f34ec9cac07ddfdcb24de66e49718b107436 /arch/arm/plat-s3c24xx/pm.c | |
parent | 11d77d0c01b80e44c7aceb21928508dafce774f9 (diff) |
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>
Diffstat (limited to 'arch/arm/plat-s3c24xx/pm.c')
-rw-r--r-- | arch/arm/plat-s3c24xx/pm.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c index d6af3082af30..c6b03f8ab260 100644 --- a/arch/arm/plat-s3c24xx/pm.c +++ b/arch/arm/plat-s3c24xx/pm.c | |||
@@ -612,26 +612,9 @@ static int s3c2410_pm_enter(suspend_state_t state) | |||
612 | return 0; | 612 | return 0; |
613 | } | 613 | } |
614 | 614 | ||
615 | /* | ||
616 | * Called after processes are frozen, but before we shut down devices. | ||
617 | */ | ||
618 | static int s3c2410_pm_prepare(suspend_state_t state) | ||
619 | { | ||
620 | return 0; | ||
621 | } | ||
622 | |||
623 | /* | ||
624 | * Called after devices are re-setup, but before processes are thawed. | ||
625 | */ | ||
626 | static int s3c2410_pm_finish(suspend_state_t state) | ||
627 | { | ||
628 | return 0; | ||
629 | } | ||
630 | |||
631 | static struct pm_ops s3c2410_pm_ops = { | 615 | static struct pm_ops s3c2410_pm_ops = { |
632 | .prepare = s3c2410_pm_prepare, | ||
633 | .enter = s3c2410_pm_enter, | 616 | .enter = s3c2410_pm_enter, |
634 | .finish = s3c2410_pm_finish, | 617 | .valid = pm_valid_only_mem, |
635 | }; | 618 | }; |
636 | 619 | ||
637 | /* s3c2410_pm_init | 620 | /* s3c2410_pm_init |