linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM / sleep: Fix broken builds without CONFIG_PM_SLEEP_DEBUG
@ 2015-09-15  8:12 Viresh Kumar
  2015-09-15 11:02 ` Pavel Machek
  2015-09-16  1:43 ` Rafael J. Wysocki
  0 siblings, 2 replies; 7+ messages in thread
From: Viresh Kumar @ 2015-09-15  8:12 UTC (permalink / raw)
  To: Rafael Wysocki
  Cc: linaro-kernel, linux-pm, Thomas Gleixner, alexandra.yates,
	Viresh Kumar, Len Brown, open list, Pavel Machek

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 <viresh.kumar@linaro.org>
---
 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)
-- 
2.4.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-16  2:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15  8:12 [PATCH] PM / sleep: Fix broken builds without CONFIG_PM_SLEEP_DEBUG Viresh Kumar
2015-09-15 11:02 ` Pavel Machek
2015-09-16  1:43 ` Rafael J. Wysocki
2015-09-16  2:00   ` Viresh Kumar
2015-09-16  2:48     ` Rafael J. Wysocki
2015-09-16  2:54       ` Rafael J. Wysocki
2015-09-16  2:30         ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).