All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-pm][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
  2008-01-04 11:48 ` [PATCH] " Pavel Machek
                   ` (5 more replies)
  0 siblings, 6 replies; 79+ 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] 79+ messages in thread

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

Thread overview: 79+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 10:10 [linux-pm][PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device Yi Yang
2008-01-04 11:48 ` [PATCH] " Pavel Machek
2008-01-04 11:48 ` [linux-pm][PATCH] " Pavel Machek
2008-01-04 16:09   ` [PATCH] " David Brownell
2008-01-04 16:09   ` [linux-pm][PATCH] " David Brownell
2008-01-04 16:38     ` Alan Stern
2008-01-04 16:52       ` [PATCH] " Olivier Galibert
2008-01-04 16:52       ` [linux-pm][PATCH] " Olivier Galibert
2008-01-04 17:20         ` [PATCH] " Oliver Neukum
2008-01-04 17:20           ` [linux-pm][PATCH] " Oliver Neukum
2008-01-07  2:00           ` Yi Yang
2008-01-07  2:00           ` [PATCH] " Yi Yang
2008-01-07  1:55         ` Yi Yang
2008-01-07  1:55         ` [linux-pm][PATCH] " Yi Yang
2008-01-07  3:49           ` David Brownell
2008-01-07  3:49           ` [PATCH] " David Brownell
2008-01-07  1:52       ` [linux-pm][PATCH] " Yi Yang
2008-01-07  1:52       ` [PATCH] " Yi Yang
2008-01-04 16:38     ` Alan Stern
2008-01-07  1:37     ` [linux-pm][PATCH] " Yi Yang
2008-01-07  1:57       ` [PATCH] " Rafael J. Wysocki
2008-01-07  1:57       ` [linux-pm][PATCH] " Rafael J. Wysocki
2008-01-07  2:05         ` Yi Yang
2008-01-07 16:46           ` [PATCH] " Rafael J. Wysocki
2008-01-07 16:46           ` [linux-pm][PATCH] " Rafael J. Wysocki
2008-01-07  2:05         ` [PATCH] " Yi Yang
2008-01-07  1:37     ` Yi Yang
2008-01-07  1:21   ` Yi Yang
2008-01-07  1:21   ` [linux-pm][PATCH] " Yi Yang
2008-01-04 16:31 ` [PATCH] " David Brownell
2008-01-04 16:31 ` [linux-pm][PATCH] " David Brownell
2008-01-07  1:51   ` [PATCH] " Yi Yang
2008-01-07  1:51   ` [linux-pm][PATCH] " Yi Yang
2008-01-22 23:05 ` [PATCH 2.6.24-rc8] cpufreq: fix obvious condition statement error Yi Yang
2008-01-28 23:14   ` [PATCH 2.6.24] x86: add sysfs interface for cpuid module Yi Yang
2008-01-29  8:44     ` Sam Ravnborg
2008-01-29 22:22       ` Yi Yang
2008-01-30  7:48         ` Sam Ravnborg
2008-01-29 15:51     ` H. Peter Anvin
2008-01-29 17:52       ` Yi Yang
2008-01-30  6:09         ` H. Peter Anvin
2008-01-29 21:56       ` Yi Yang
2008-01-30  7:17         ` H. Peter Anvin
2008-01-29 22:13           ` Yi Yang
2008-01-30  7:33             ` H. Peter Anvin
2008-01-29 23:41     ` [RFC PATCH 2.6.24] x86: add sysfs interface for cpuid module, try 2 Yi Yang
2008-01-30 17:35       ` H. Peter Anvin
2008-01-31  1:18       ` [PATCH 2.6.24] Add new string functions real_strtoul and change kernel params to use them Yi Yang
2008-01-31 17:03         ` Randy Dunlap
2008-01-31 16:30           ` Yi Yang
2008-02-01  2:47             ` Randy Dunlap
2008-01-31 22:11         ` [PATCH 2.6.24] Add new string functions strict_strto* and convert kernel params to use them, take 2 Yi Yang
2008-02-01  0:02           ` [PATCH 2.6.24] Add new string functions strict_strto* and convert kernel params to use them, take 3 Yi Yang
2008-02-01  7:36           ` [PATCH 2.6.24] Add new string functions strict_strto* and convert kernel params to use them, take 2 Andrew Morton
2008-02-01  7:39           ` Andrew Morton
2008-02-01  7:40           ` Andrew Morton
2008-02-01 16:31     ` [PATCH 2.6.24] x86: add sysfs interface for cpuid module dean gaudet
2008-02-01 17:56       ` H. Peter Anvin
2008-02-01 17:58         ` H. Peter Anvin
2008-02-14 23:44   ` [PATCH 2.6.25-rc1] cpufreq: fix cpufreq policy refcount imbalance Yi Yang
2008-02-14 23:44   ` Yi Yang
2008-02-14 23:48   ` Yi Yang
2008-02-15 15:52     ` [linux-pm] " Alan Stern
2008-02-15 15:52       ` Alan Stern
2008-02-15 18:24       ` Greg KH
2008-02-15 18:24       ` [linux-pm] " Greg KH
2008-02-15 15:52     ` Alan Stern
2008-02-15 21:01     ` 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
2008-02-25  0:46     ` Yi Yang
2008-02-25 10:15       ` Ingo Molnar
2008-02-25 10:15       ` Ingo Molnar
2008-02-25  1:10         ` Yi Yang
2008-02-25  1:10         ` Yi Yang
2008-03-26  4:46       ` Len Brown
2008-03-26  4:46         ` Len Brown
2008-02-14 23:48   ` [PATCH 2.6.25-rc1] cpufreq: fix cpufreq policy refcount imbalance Yi Yang
2008-01-22 23:05 ` [PATCH 2.6.24-rc8] cpufreq: fix obvious condition statement error Yi Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.