public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device
@ 2008-01-04 10:10 Yi Yang
  0 siblings, 0 replies; 27+ messages in thread
From: Yi Yang @ 2008-01-04 10:10 UTC (permalink / raw)
  To: pavel, linux-pm; +Cc: linux-kernel

If a device can't support wakeup, its /sys/devices/.../power/wakeup output is
empty, this is confusing, a user doesn't know if it supports wakeup feature
unless he/she read the ralated source code, for this case, it is more
reasonable to output "unsupported". Otherwise, no matter what value the user
sets to /sys/devices/.../power/wakeup, the result is the same:  Invalid argument,
so the user doesn't know why.

This patch changes empty output to "unsupported" in order that a user knows
wakeup feature isn't supported by this device when he/she
'cat /sys/devices/.../power/wakeup', please consider to apply, thanks.

Signed-off-by: Yi Yang <yi.y.yang@intel.com>
---
 sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/base/power/sysfs.c	2008-01-04 16:50:54.000000000 +0800
+++ b/drivers/base/power/sysfs.c	2008-01-04 17:14:42.000000000 +0800
@@ -49,7 +49,7 @@ wake_show(struct device * dev, struct de
 {
 	return sprintf(buf, "%s\n", device_can_wakeup(dev)
 		? (device_may_wakeup(dev) ? enabled : disabled)
-		: "");
+		: "unsupported");
 }
 
 static ssize_t

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2008-03-26  4:46 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1199441414.19185.9.camel@yangyi-dev.bj.intel.com>
2008-01-04 11:48 ` [PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device Pavel Machek
     [not found] ` <20080104114832.GA4114@elf.ucw.cz>
2008-01-04 16:09   ` David Brownell
     [not found]   ` <20080104160933.B01D81FBAB5@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
2008-01-04 16:38     ` Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.0801041136490.4078-100000@iolanthe.rowland.org>
2008-01-04 16:52       ` Olivier Galibert
     [not found]       ` <20080104165214.GA30672@dspnet.fr.eu.org>
2008-01-04 17:20         ` Oliver Neukum
2008-01-07  2:00           ` Yi Yang
2008-01-07  1:55         ` Yi Yang
     [not found]         ` <1199670923.3551.10.camel@yangyi-dev.bj.intel.com>
2008-01-07  3:49           ` David Brownell
2008-01-07  1:52       ` Yi Yang
2008-01-07  1:37     ` Yi Yang
     [not found]     ` <1199669879.19185.20.camel@yangyi-dev.bj.intel.com>
2008-01-07  1:57       ` Rafael J. Wysocki
     [not found]       ` <200801070257.58884.rjw@sisk.pl>
2008-01-07  2:05         ` Yi Yang
     [not found]         ` <1199671545.3551.16.camel@yangyi-dev.bj.intel.com>
2008-01-07 16:46           ` Rafael J. Wysocki
2008-01-07  1:21   ` Yi Yang
2008-01-04 16:31 ` David Brownell
     [not found] ` <20080104163101.EDC02115203@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
2008-01-07  1:51   ` Yi Yang
2008-01-22 23:05 ` [PATCH 2.6.24-rc8] cpufreq: fix obvious condition statement error Yi Yang
     [not found] ` <1201043126.3861.5.camel@yangyi-dev.bj.intel.com>
2008-02-14 23:44   ` [PATCH 2.6.25-rc1] cpufreq: fix cpufreq policy refcount imbalance Yi Yang
2008-02-14 23:48   ` Yi Yang
     [not found]   ` <1203032921.3897.10.camel@yangyi-dev.bj.intel.com>
2008-02-15 15:52     ` Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.0802151043230.3423-100000@iolanthe.rowland.org>
2008-02-15 18:24       ` Greg KH
2008-02-15 21:01     ` Greg KH
2008-02-25  0:46     ` [PATCH 2.6.25-rc3] cpuidle: fix cpuidle time and usage overflow Yi Yang
     [not found]     ` <1203900372.4954.8.camel@yangyi-dev.bj.intel.com>
     [not found]       ` <20080225101533.GB30685@elte.hu>
2008-02-25  1:10         ` Yi Yang
2008-02-25 10:15       ` Ingo Molnar
2008-03-26  4:46       ` Len Brown
2008-01-04 10:10 [PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device Yi Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox