All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Fleig <andreasfleig@gmail.com>
To: linux-acpi@vger.kernel.org
Subject: [PATCH] ACPI: Fix /proc/acpi/wakeup for devices w/o bus or parent
Date: Sun, 27 Jan 2013 15:17:55 +0100	[thread overview]
Message-ID: <51053713.6090804@gmail.com> (raw)

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,

             reply	other threads:[~2013-01-27 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-27 14:17 Andreas Fleig [this message]
2013-01-27 22:46 ` [PATCH] ACPI: Fix /proc/acpi/wakeup for devices w/o bus or parent Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51053713.6090804@gmail.com \
    --to=andreasfleig@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.