ARM: S3C24XX: Fix s3c24xx build errors if !CONFIG_PM
authorDomenico Andreoli <cavokz@gmail.com>
Fri, 21 Oct 2011 19:00:53 +0000 (04:00 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Fri, 21 Oct 2011 19:00:53 +0000 (04:00 +0900)
v2:
- register_syscore_ops(&s3c24xx_irq_syscore_ops) does not need to be
  conditionally compiled out, it is already optimized out on !CONFIG_PM
- fix also s3c2412 and s3c2416 affected by the same build issue

v1:
s3c2440.c fails to build if !CONFIG_PM because in such case
s3c2410_pm_syscore_ops is not defined. Same error should happen also
in s3c2410.c and s3c2442.c

Signed-off-by: Domenico Andreoli <cavokz@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-s3c2410/s3c2410.c
arch/arm/mach-s3c2412/s3c2412.c
arch/arm/mach-s3c2416/s3c2416.c
arch/arm/mach-s3c2440/s3c2440.c
arch/arm/mach-s3c2440/s3c2442.c

index f1d3bd8f6f179dfc9c54ab41953cde1ba389ca2b..343a540d86a988d4d55a54b8dea79c87eb876ef7 100644 (file)
@@ -170,7 +170,9 @@ int __init s3c2410_init(void)
 {
        printk("S3C2410: Initialising architecture\n");
 
+#ifdef CONFIG_PM
        register_syscore_ops(&s3c2410_pm_syscore_ops);
+#endif
        register_syscore_ops(&s3c24xx_irq_syscore_ops);
 
        return sysdev_register(&s3c2410_sysdev);
index ef0958d3e5c6e1b6dda7a9586099b1ebc3da739a..57a1e01e4e504df85896d275b244782c7e6644e3 100644 (file)
@@ -245,7 +245,9 @@ int __init s3c2412_init(void)
 {
        printk("S3C2412: Initialising architecture\n");
 
+#ifdef CONFIG_PM
        register_syscore_ops(&s3c2412_pm_syscore_ops);
+#endif
        register_syscore_ops(&s3c24xx_irq_syscore_ops);
 
        return sysdev_register(&s3c2412_sysdev);
index 494ce913dc9571752f81590784de2213bfc46bcb..20b3fdfb3051fb7533ec67cee9b5659b13dfda22 100644 (file)
@@ -97,7 +97,9 @@ int __init s3c2416_init(void)
 
        s3c_fb_setname("s3c2443-fb");
 
+#ifdef CONFIG_PM
        register_syscore_ops(&s3c2416_pm_syscore_ops);
+#endif
        register_syscore_ops(&s3c24xx_irq_syscore_ops);
 
        return sysdev_register(&s3c2416_sysdev);
index ce99ff72838defb31fd4fa37f04a61f2660bbc73..2270d3360216abffa913fcbdfff19384a300e558 100644 (file)
@@ -55,7 +55,9 @@ int __init s3c2440_init(void)
 
        /* register suspend/resume handlers */
 
+#ifdef CONFIG_PM
        register_syscore_ops(&s3c2410_pm_syscore_ops);
+#endif
        register_syscore_ops(&s3c244x_pm_syscore_ops);
        register_syscore_ops(&s3c24xx_irq_syscore_ops);
 
index 9ad99f8016a174b119c3ff46bf51e1191320146f..6f2b65e6e06868ba96bc27df27dfec5643eac254 100644 (file)
@@ -169,7 +169,9 @@ int __init s3c2442_init(void)
 {
        printk("S3C2442: Initialising architecture\n");
 
+#ifdef CONFIG_PM
        register_syscore_ops(&s3c2410_pm_syscore_ops);
+#endif
        register_syscore_ops(&s3c244x_pm_syscore_ops);
        register_syscore_ops(&s3c24xx_irq_syscore_ops);