power management: no valid states w/o pm_ops
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 16 Feb 2007 09:38:29 +0000 (01:38 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 23 Feb 2007 22:52:09 +0000 (14:52 -0800)
commit9c372d06ce9ddf65e1393f9ea22a6d6bd5f96b42
tree24e4b7d7ab60d68426c6c3e2ba976deffb94e575
parentdfe461aef0d621d8472d0af343ae8a60866a7a8a
power management: no valid states w/o pm_ops

Change /sys/power/state to not advertise any valid states (except for disk
if SOFTWARE_SUSPEND is enabled) when no pm_ops have been set so userspace
can easily discover what states should be available.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Macheck <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/power/main.c