From patchwork Fri Aug 16 22:34:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 267871 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id B828A2C0242 for ; Sat, 17 Aug 2013 08:42:20 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1VASik-0004Cu-54; Fri, 16 Aug 2013 22:42:14 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1VASgP-0002z4-LP for kernel-team@lists.ubuntu.com; Fri, 16 Aug 2013 22:39:49 +0000 Received: from c-67-160-231-162.hsd1.ca.comcast.net ([67.160.231.162] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1VASc1-0004N2-1M; Fri, 16 Aug 2013 22:35:17 +0000 Received: from kamal by fourier with local (Exim 4.80) (envelope-from ) id 1VASby-0007Yq-UF; Fri, 16 Aug 2013 15:35:14 -0700 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Subject: [PATCH 098/133] ACPI / PM: Fix /proc/acpi/wakeup for devices w/o bus or parent Date: Fri, 16 Aug 2013 15:34:00 -0700 Message-Id: <1376692475-28413-99-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1376692475-28413-1-git-send-email-kamal@canonical.com> References: <1376692475-28413-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.8 Cc: Kamal Mostafa , "Rafael J. Wysocki" , Andreas Fleig X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com 3.8.13.7 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Andreas Fleig commit 65ab96f60621c4da8f1b4087a57b788bc4d8f27b upstream. 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 Signed-off-by: Rafael J. Wysocki [ kamal: 3.8.y-stable prereq for 623cf33c ] Signed-off-by: Kamal Mostafa --- drivers/acpi/proc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c index ef98796..52ce767 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) dev->pnp.bus_id, (u32) dev->wakeup.sleep_state); - if (!dev->physical_node_count) + if (!dev->physical_node_count) { seq_printf(seq, "%c%-8s\n", - dev->wakeup.flags.run_wake ? - '*' : ' ', "disabled"); - else { + dev->wakeup.flags.run_wake ? '*' : ' ', + device_may_wakeup(&dev->dev) ? + "enabled" : "disabled"); + } else { struct device *ldev; list_for_each_entry(entry, &dev->physical_node_list, node) {