ARM: tegra: irq: protect irq suspend with CONFIG_PM
authorAllen Martin <AMartin@nvidia.com>
Fri, 19 Nov 2010 22:50:50 +0000 (14:50 -0800)
committerColin Cross <ccross@android.com>
Thu, 25 Nov 2010 00:28:34 +0000 (16:28 -0800)
Protect irq suspend/resume functions behind #ifdef CONFIG_PM.
This prevents a link error if CONFIG_PM is turned off.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
arch/arm/mach-tegra/irq.c

index 458f9c8e85cbada0c07914b1a0f20faf79cc9354..47b7064ae061a1d22418bf58de528be0dc884c94 100644 (file)
@@ -146,6 +146,7 @@ void tegra_set_lp0_wake_pads(u32 wake_enb, u32 wake_level, u32 wake_any)
        writel(wake_enb, pmc + PMC_WAKE_MASK);
 }
 
+#ifdef CONFIG_PM
 static void tegra_irq_handle_wake(void)
 {
        int wake;
@@ -174,6 +175,7 @@ static void tegra_irq_handle_wake(void)
                generic_handle_irq(irq);
        }
 }
+#endif
 
 static void tegra_mask(unsigned int irq)
 {
@@ -251,6 +253,7 @@ void __init tegra_init_irq(void)
        }
 }
 
+#ifdef CONFIG_PM
 void tegra_irq_suspend(void)
 {
        tegra_legacy_irq_suspend();
@@ -261,6 +264,7 @@ void tegra_irq_resume(void)
        tegra_legacy_irq_resume();
        tegra_irq_handle_wake();
 }
+#endif
 
 #ifdef CONFIG_DEBUG_FS
 static int tegra_wake_irq_debug_show(struct seq_file *s, void *data)