[PATCH] introduce .valid callback for pm_ops
authorShaohua Li <shaohua.li@intel.com>
Sun, 30 Oct 2005 23:00:01 +0000 (15:00 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 01:37:15 +0000 (17:37 -0800)
commiteb9289eb20df6b54214c45ac7c6bf5179a149026
treedac51cecdd94e0c7273c990259ddd800057311b9
parent0245b3e787dc3267a915e1f56419e7e9c197e148
[PATCH] introduce .valid callback for pm_ops

Add pm_ops.valid callback, so only the available pm states show in
/sys/power/state.  And this also makes an earlier states error report at
enter_state before we do actual suspend/resume.

Signed-off-by: Shaohua Li<shaohua.li@intel.com>
Acked-by: Pavel Machek<pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/acpi/sleep/main.c
include/linux/pm.h
kernel/power/main.c