From 36c4723983a48525f8a3477215edabb17456eff9 Mon Sep 17 00:00:00 2001 From: Steven Miao Date: Fri, 21 Dec 2012 14:34:16 +0800 Subject: [PATCH] blackfin: pm: fix build error Only register pm ops when defined CONFIG_PM. Signed-off-by: Steven Miao Signed-off-by: Bob Liu --- arch/blackfin/mach-common/ints-priority.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index 83ff311fd6ea..6c0c6816a51a 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c @@ -1195,6 +1195,7 @@ static struct syscore_ops sec_pm_syscore_ops = { .suspend = sec_suspend, .resume = sec_resume, }; + #endif #else # define bfin_gpio_set_wake NULL @@ -1596,7 +1597,10 @@ int __init init_arch_irq(void) bfin_write_SEC_SCI(1, SEC_CCTL, SEC_CCTL_EN | SEC_CCTL_NMI_EN); init_software_driven_irq(); + +#ifdef CONFIG_PM register_syscore_ops(&sec_pm_syscore_ops); +#endif return 0; }