diff options
author | Andreas Fleig <andreasfleig@gmail.com> | 2013-01-27 09:17:55 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-27 15:40:11 -0500 |
commit | 65ab96f60621c4da8f1b4087a57b788bc4d8f27b (patch) | |
tree | 0bdc700c08ff7977c3850b97fba82401e5dc4221 /drivers/acpi/proc.c | |
parent | 660b1113e0f33a476952cb2cbcb5c9831e7ff4cd (diff) |
ACPI / PM: 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.
[rjw: White space and coding style.]
Signed-off-by: Andreas Fleig <andreasfleig@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/proc.c')
-rw-r--r-- | drivers/acpi/proc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c index ef98796b3824..52ce76725c20 100644 --- a/drivers/acpi/proc.c +++ b/drivers/acpi/proc.c | |||
@@ -311,11 +311,12 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset) | |||
311 | dev->pnp.bus_id, | 311 | dev->pnp.bus_id, |
312 | (u32) dev->wakeup.sleep_state); | 312 | (u32) dev->wakeup.sleep_state); |
313 | 313 | ||
314 | if (!dev->physical_node_count) | 314 | if (!dev->physical_node_count) { |
315 | seq_printf(seq, "%c%-8s\n", | 315 | seq_printf(seq, "%c%-8s\n", |
316 | dev->wakeup.flags.run_wake ? | 316 | dev->wakeup.flags.run_wake ? '*' : ' ', |
317 | '*' : ' ', "disabled"); | 317 | device_may_wakeup(&dev->dev) ? |
318 | else { | 318 | "enabled" : "disabled"); |
319 | } else { | ||
319 | struct device *ldev; | 320 | struct device *ldev; |
320 | list_for_each_entry(entry, &dev->physical_node_list, | 321 | list_for_each_entry(entry, &dev->physical_node_list, |
321 | node) { | 322 | node) { |