From patchwork Sun Jan 27 14:17:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fleig X-Patchwork-Id: 2051701 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 42407DFE86 for ; Sun, 27 Jan 2013 14:17:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755304Ab3A0OR6 (ORCPT ); Sun, 27 Jan 2013 09:17:58 -0500 Received: from mail-bk0-f53.google.com ([209.85.214.53]:62717 "EHLO mail-bk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754965Ab3A0OR5 (ORCPT ); Sun, 27 Jan 2013 09:17:57 -0500 Received: by mail-bk0-f53.google.com with SMTP id j10so915474bkw.12 for ; Sun, 27 Jan 2013 06:17:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=T9MwlAi9BbYJMJXLaQ35TgQC/jqo8C80vugl/+15jo8=; b=cKOz4Dz6ZVpq8DjkHeQVa+NDtC2yv9BHlnSBMSSoi7akp/7kiPmeNdkrv447BZQCZ7 jngus4/zFkQbrI1I7nJu2pRZ73Mo1bAt9/g9lrga1Gqad1OqpC7RDzdc6rCby7clkq1f FRjt5xqJbXZGdnrHC6vP/T9IIkpfEcQmeSiwAqWcknqk9YR7ax9/miR7nv/UFTOF01ko P7ieyMYTMmPucNMZoZN5dzi7HIyk77Kqmlp5icPLdcHeYj7CiN+fUhU7JjO2S1hvyZSu vbeS5warczseUw1tMahrTveJN3Dqbd/KoSqaKijIEqHN8W9JrrcwRpof/wIf52XYzD37 y8Qw== X-Received: by 10.204.9.4 with SMTP id j4mr3248040bkj.36.1359296276425; Sun, 27 Jan 2013 06:17:56 -0800 (PST) Received: from [192.168.42.141] (HSI-KBW-134-3-247-172.hsi14.kabel-badenwuerttemberg.de. [134.3.247.172]) by mx.google.com with ESMTPS id f24sm4068734bkw.4.2013.01.27.06.17.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 27 Jan 2013 06:17:55 -0800 (PST) Message-ID: <51053713.6090804@gmail.com> Date: Sun, 27 Jan 2013 15:17:55 +0100 From: Andreas Fleig User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: linux-acpi@vger.kernel.org Subject: [PATCH] ACPI: Fix /proc/acpi/wakeup for devices w/o bus or parent Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 --- 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;