From patchwork Tue Sep 15 08:12:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 53618 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id A5AEF22A22 for ; Tue, 15 Sep 2015 08:12:40 +0000 (UTC) Received: by lamp12 with SMTP id p12sf56770152lam.2 for ; Tue, 15 Sep 2015 01:12:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=t5h0fN7LQgYVBOfKkxaAfzt67cE/GKSrlKHC7L7bx5U=; b=WyVFE7W0HbiOJ8P6UJYv2BYDympoPDEI1w4jud5ILqqyNJsaFUTVw+EC0Vmb+qCLe7 LpVV6QWumrdIq8eiVnvOygUVKBJ6g7dfcOk8EtnyGIq2UzWaHsGpvWMgF2wz/b+xO2Um tRA4CgP1mhCEgdj19OVCJArU6nx21IP0nzMwqySLGxPNOYXTQm34mfz18HYBJIbrJrfv S2hWgCm40nsyMnvVc3Gd/O+U+LngNWpdvfnUmNR5OZlY+f9vfmFw4PUzop8nBigyP2lQ ioaykhRUGYS0IwVzYSIXY+gyAc5N7sQT3iMxcNkgxzkDSrgLx8TWTXgEeFIUEgeIP2hS Rl+Q== X-Gm-Message-State: ALoCoQmRcLIRi5cMAIBPzecJgp6ZN+W3W4pEI7C0i5DUXImv4ldi0lwDGy7tSGWXx48EnTFAAhzT X-Received: by 10.112.139.65 with SMTP id qw1mr3966882lbb.24.1442304759619; Tue, 15 Sep 2015 01:12:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.10 with SMTP id w10ls451369law.69.gmail; Tue, 15 Sep 2015 01:12:39 -0700 (PDT) X-Received: by 10.112.156.193 with SMTP id wg1mr19066753lbb.24.1442304759427; Tue, 15 Sep 2015 01:12:39 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id o9si2734619lbc.25.2015.09.15.01.12.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 01:12:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbbvu2 with SMTP id vu2so8159381lbb.0 for ; Tue, 15 Sep 2015 01:12:39 -0700 (PDT) X-Received: by 10.152.28.9 with SMTP id x9mr10230193lag.73.1442304759253; Tue, 15 Sep 2015 01:12:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1637288lbq; Tue, 15 Sep 2015 01:12:38 -0700 (PDT) X-Received: by 10.50.26.66 with SMTP id j2mr3417131igg.42.1442304757040; Tue, 15 Sep 2015 01:12:37 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 88si12169503ioi.7.2015.09.15.01.12.36; Tue, 15 Sep 2015 01:12:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752740AbbIOIMe (ORCPT + 29 others); Tue, 15 Sep 2015 04:12:34 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:32833 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340AbbIOIMa (ORCPT ); Tue, 15 Sep 2015 04:12:30 -0400 Received: by pacex6 with SMTP id ex6so170185752pac.0 for ; Tue, 15 Sep 2015 01:12:30 -0700 (PDT) X-Received: by 10.68.185.132 with SMTP id fc4mr37801997pbc.96.1442304750354; Tue, 15 Sep 2015 01:12:30 -0700 (PDT) Received: from localhost ([122.172.133.50]) by smtp.gmail.com with ESMTPSA id bi2sm17728373pbb.45.2015.09.15.01.12.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 15 Sep 2015 01:12:29 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Thomas Gleixner , alexandra.yates@linux.intel.com, Viresh Kumar , Len Brown , linux-kernel@vger.kernel.org (open list), Pavel Machek Subject: [PATCH] PM / sleep: Fix broken builds without CONFIG_PM_SLEEP_DEBUG Date: Tue, 15 Sep 2015 13:42:21 +0530 Message-Id: X-Mailer: git-send-email 2.4.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The variable 'wakeup_irq' is defined within #ifdef CONFIG_PM_SLEEP_DEBUG and used outside of it. And that breaks kernel build: /home/viresh/linux/drivers/base/power/wakeup.c:871: undefined reference to `wakeup_irq' /home/viresh/drivers/base/power/wakeup.c:871: undefined reference to `wakeup_irq' Fix it by defining the variable outside of the ifdef. Fixes: d1e59c235322 ("PM / sleep: Report interrupt that caused system wakeup") Signed-off-by: Viresh Kumar Acked-by: Pavel Machek --- kernel/power/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/power/main.c b/kernel/power/main.c index 9880bf888a5b..f97a188f4ccc 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -235,6 +235,9 @@ late_initcall(pm_debugfs_init); #endif /* CONFIG_PM_SLEEP */ +/* IRQ number which causes system wakeup */ +unsigned int wakeup_irq; + #ifdef CONFIG_PM_SLEEP_DEBUG /* * pm_print_times: print time taken by devices to suspend and resume. @@ -273,7 +276,6 @@ static inline void pm_print_times_init(void) pm_print_times_enabled = !!initcall_debug; } -unsigned int wakeup_irq; static ssize_t pm_wakeup_irq_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)