Linux ACPI
 help / color / mirror / Atom feed
* [PATCH] ACPI: Fix /proc/acpi/wakeup for devices w/o bus or parent
@ 2013-01-27 14:17 Andreas Fleig
  2013-01-27 22:46 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Fleig @ 2013-01-27 14:17 UTC (permalink / raw)
  To: linux-acpi

Fix /proc/acpi/wakeup for devices without bus or parent

This patch fixes printing the wakeup status for devices without a bus
or parent, such as laptop lid switches and sleep buttons. These devices
have an empty physical_node_list, because acpi_bind_one is never run
for them.

Signed-off-by: Andreas Fleig <andreasfleig@gmail.com>
---
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index 27adb09..3623ea8 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -314,7 +314,8 @@ acpi_system_wakeup_device_seq_show(struct seq_file 
*seq, void *offset)
  		if (!dev->physical_node_count)
  			seq_printf(seq, "%c%-8s\n",
  				dev->wakeup.flags.run_wake ?
-				'*' : ' ', "disabled");
+				'*' : ' ', device_may_wakeup(&dev->dev) ?
+				"enabled" : "disabled");
  		else {
  			struct device *ldev;
  			list_for_each_entry(entry, &dev->physical_node_list,

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

end of thread, other threads:[~2013-01-27 22:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-27 14:17 [PATCH] ACPI: Fix /proc/acpi/wakeup for devices w/o bus or parent Andreas Fleig
2013-01-27 22:46 ` Rafael J. Wysocki

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