Skip to contentSkip to conversation

ACPI: Fix /proc/acpi/wakeup for devices w/o bus or parent

PATCH In review Andreas Fleig 2 participants 2 messages Jan 27, 2013 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: Fix /proc/acpi/wakeup for devices w/o bus or parent

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.

---

drivers/acpi/proc.c +2 -1
index 27adb09..3623ea8 100644
@@ -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,
#1 lore raw
Quoted 8 lines · Andreas Fleig

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.

OK, I'm going to take this (but I'm going to fix white space while applying it).

Thanks,
Rafael

Quoted 20 lines

---

drivers/acpi/proc.c +2 -1
index 27adb09..3623ea8 100644
@@ -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,
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.