Skip to contentSkip to conversation

Fix s3c24xx build error if !CONFIG_PM

PATCH Superseded Domenico Andreoli 2 participants 4 messages Oct 18, 2011 – Oct 21, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix s3c24xx build error if !CONFIG_PM

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

This patch fixes all of them.

---
 arch/arm/mach-s3c2410/s3c2410.c |    2 ++
 arch/arm/mach-s3c2440/s3c2440.c |    2 ++
 arch/arm/mach-s3c2440/s3c2442.c |    2 ++
 3 files changed, 6 insertions(+)
arch/arm/mach-s3c2410/s3c2410.c +2 -0
Index: b/arch/arm/mach-s3c2410/s3c2410.c
===================================================================
@@ -170,8 +170,10 @@ int __init s3c2410_init(void)
 {
 	printk("S3C2410: Initialising architecture\n");
 
+#ifdef CONFIG_PM
 	register_syscore_ops(&s3c2410_pm_syscore_ops);
 	register_syscore_ops(&s3c24xx_irq_syscore_ops);
+#endif
 
 	return sysdev_register(&s3c2410_sysdev);
 }
arch/arm/mach-s3c2440/s3c2440.c +2 -0
Index: b/arch/arm/mach-s3c2440/s3c2440.c
===================================================================
@@ -55,9 +55,11 @@ int __init s3c2440_init(void)
 
 	/* register suspend/resume handlers */
 
+#ifdef CONFIG_PM
 	register_syscore_ops(&s3c2410_pm_syscore_ops);
 	register_syscore_ops(&s3c244x_pm_syscore_ops);
 	register_syscore_ops(&s3c24xx_irq_syscore_ops);
+#endif
 
 	/* register our system device for everything else */
 
arch/arm/mach-s3c2440/s3c2442.c +2 -0
Index: b/arch/arm/mach-s3c2440/s3c2442.c
===================================================================
@@ -169,9 +169,11 @@ int __init s3c2442_init(void)
 {
 	printk("S3C2442: Initialising architecture\n");
 
+#ifdef CONFIG_PM
 	register_syscore_ops(&s3c2410_pm_syscore_ops);
 	register_syscore_ops(&s3c244x_pm_syscore_ops);
 	register_syscore_ops(&s3c24xx_irq_syscore_ops);
+#endif
 
 	return sysdev_register(&s3c2442_sysdev);
 }
#1 lore raw

PATCH 1/1 Fix s3c24xx build error if !CONFIG_PM

Quoted 21 lines · Domenico Andreoli

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

This patch fixes all of them.

---
 arch/arm/mach-s3c2410/s3c2410.c |    2 ++
 arch/arm/mach-s3c2440/s3c2440.c |    2 ++
 arch/arm/mach-s3c2440/s3c2442.c |    2 ++
 3 files changed, 6 insertions(+)

Index: b/arch/arm/mach-s3c2410/s3c2410.c
=============================================================
======

arch/arm/mach-s3c2410/s3c2410.c int __init s3c2410_init(void) · line 175

Quoted 6 lines
arch/arm/mach-s3c2410/s3c2410.c +1 -0
@@ -170,8 +170,10 @@ int __init s3c2410_init(void)
 {
 	printk("S3C2410: Initialising architecture\n");
 
+#ifdef CONFIG_PM
 	register_syscore_ops(&s3c2410_pm_syscore_ops);
 	register_syscore_ops(&s3c24xx_irq_syscore_ops);

I think, basically we don't need condition for "s3c24xx_irq_syscore_ops", since it will be built without CONFIG_PM.

Quoted 10 lines
arch/arm/mach-s3c2410/s3c2410.c +1 -0
+#endif
 
 	return sysdev_register(&s3c2410_sysdev);
 }

Index: b/arch/arm/mach-s3c2440/s3c2440.c
=============================================================
======

arch/arm/mach-s3c2440/s3c2440.c int __init s3c2440_init(void) · line 60

Quoted 6 lines
arch/arm/mach-s3c2440/s3c2440.c +1 -0
@@ -55,9 +55,11 @@ int __init s3c2440_init(void)
 
 	/* register suspend/resume handlers */
 
+#ifdef CONFIG_PM
 	register_syscore_ops(&s3c2410_pm_syscore_ops);
 	register_syscore_ops(&s3c244x_pm_syscore_ops);

Same as above.

arch/arm/mach-s3c2440/s3c2440.c int __init s3c2440_init(void) · line 61

Quoted 1 line
arch/arm/mach-s3c2440/s3c2440.c +0 -0
 	register_syscore_ops(&s3c24xx_irq_syscore_ops);

Same as above.

Quoted 10 lines
arch/arm/mach-s3c2440/s3c2440.c +1 -0
+#endif
 
 	/* register our system device for everything else */
 

Index: b/arch/arm/mach-s3c2440/s3c2442.c
=============================================================
======

arch/arm/mach-s3c2440/s3c2442.c int __init s3c2442_init(void) · line 174

Quoted 6 lines
arch/arm/mach-s3c2440/s3c2442.c +1 -0
@@ -169,9 +169,11 @@ int __init s3c2442_init(void)
 {
 	printk("S3C2442: Initialising architecture\n");
 
+#ifdef CONFIG_PM
 	register_syscore_ops(&s3c2410_pm_syscore_ops);
 	register_syscore_ops(&s3c244x_pm_syscore_ops);

Same as above.

arch/arm/mach-s3c2440/s3c2442.c int __init s3c2442_init(void) · line 175

Quoted 1 line
arch/arm/mach-s3c2440/s3c2442.c +0 -0
 	register_syscore_ops(&s3c24xx_irq_syscore_ops);

Same as above.

arch/arm/mach-s3c2440/s3c2442.c int __init s3c2442_init(void) · line 179

Quoted 4 lines
arch/arm/mach-s3c2440/s3c2442.c +1 -0
+#endif
 
 	return sysdev_register(&s3c2442_sysdev);
 }

Err...happend following build error without CONFIG_PM on 3.1-rc10.

arch/arm/mach-s3c2410/built-in.o: In function `s3c2410_init':
arch/arm/mach-s3c2410/s3c2410.c:177: undefined reference to s3c2410_pm_syscore_ops' arch/arm/mach-s3c2412/built-in.o: In function s3c2412_init':
arch/arm/mach-s3c2412/s3c2412.c:252: undefined reference to s3c2412_pm_syscore_ops' arch/arm/mach-s3c2416/built-in.o: In function s3c2416_init':
arch/arm/mach-s3c2416/s3c2416.c:104: undefined reference to s3c2416_pm_syscore_ops' arch/arm/mach-s3c2440/built-in.o: In function s3c2440_init':
arch/arm/mach-s3c2440/s3c2440.c:65: undefined reference to s3c2410_pm_syscore_ops' arch/arm/mach-s3c2440/built-in.o: In function s3c2442_init':
arch/arm/mach-s3c2440/s3c2442.c:177: undefined reference to `s3c2410_pm_syscore_ops'

So this should be following?

(quoted diff) +0 -0

b/arch/arm/mach-s3c2410/s3c2410.c
index f1d3bd8..343a540 100644

arch/arm/mach-s3c2410/s3c2410.c +2 -0
@@ -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);
(quoted diff) +0 -0

b/arch/arm/mach-s3c2412/s3c2412.c
index ef0958d..57a1e01 100644

arch/arm/mach-s3c2412/s3c2412.c +2 -0
@@ -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);
(quoted diff) +0 -0

b/arch/arm/mach-s3c2416/s3c2416.c
index 494ce91..20b3fdf 100644

arch/arm/mach-s3c2416/s3c2416.c +2 -0
@@ -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);
(quoted diff) +0 -0

b/arch/arm/mach-s3c2440/s3c2440.c
index ce99ff7..2270d33 100644

arch/arm/mach-s3c2440/s3c2440.c +2 -0
@@ -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);
 
(quoted diff) +0 -0

b/arch/arm/mach-s3c2440/s3c2442.c
index 9ad99f8..6f2b65e 100644

arch/arm/mach-s3c2440/s3c2442.c +2 -0
@@ -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);
 

However, hmm....I think, we need to sort out regarding s3c24xx PM codes' structure.

Anyway, Domenico, if you're ok with above, could you please re-submit?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#2 lore raw

PATCH v2 1/1 Fix s3c24xx build errors if !CONFIG_PM

From: Domenico Andreoli <[email protected]>

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

---
 arch/arm/mach-s3c2410/s3c2410.c |    2 ++
 arch/arm/mach-s3c2412/s3c2412.c |    2 ++
 arch/arm/mach-s3c2416/s3c2416.c |    2 ++
 arch/arm/mach-s3c2440/s3c2440.c |    2 ++
 arch/arm/mach-s3c2440/s3c2442.c |    2 ++
 5 files changed, 10 insertions(+)
arch/arm/mach-s3c2410/s3c2410.c +2 -0
Index: b/arch/arm/mach-s3c2410/s3c2410.c
===================================================================
@@ -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);
arch/arm/mach-s3c2412/s3c2412.c +2 -0
Index: b/arch/arm/mach-s3c2412/s3c2412.c
===================================================================
@@ -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);
arch/arm/mach-s3c2416/s3c2416.c +2 -0
Index: b/arch/arm/mach-s3c2416/s3c2416.c
===================================================================
@@ -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);
arch/arm/mach-s3c2440/s3c2440.c +2 -0
Index: b/arch/arm/mach-s3c2440/s3c2440.c
===================================================================
@@ -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);
 
arch/arm/mach-s3c2440/s3c2442.c +2 -0
Index: b/arch/arm/mach-s3c2440/s3c2442.c
===================================================================
@@ -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);
 
#3 lore raw

PATCH v2 1/1 Fix s3c24xx build errors if !CONFIG_PM

Quoted 83 lines · Domenico Andreoli

From: Domenico Andreoli<[email protected]>

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

---
  arch/arm/mach-s3c2410/s3c2410.c |    2 ++
  arch/arm/mach-s3c2412/s3c2412.c |    2 ++
  arch/arm/mach-s3c2416/s3c2416.c |    2 ++
  arch/arm/mach-s3c2440/s3c2440.c |    2 ++
  arch/arm/mach-s3c2440/s3c2442.c |    2 ++
  5 files changed, 10 insertions(+)

Index: b/arch/arm/mach-s3c2410/s3c2410.c
===================================================================

arch/arm/mach-s3c2410/s3c2410.c +2 -0
@@ -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: b/arch/arm/mach-s3c2412/s3c2412.c
===================================================================

arch/arm/mach-s3c2412/s3c2412.c +2 -0
@@ -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: b/arch/arm/mach-s3c2416/s3c2416.c
===================================================================

arch/arm/mach-s3c2416/s3c2416.c +2 -0
@@ -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: b/arch/arm/mach-s3c2440/s3c2440.c
===================================================================

arch/arm/mach-s3c2440/s3c2440.c +2 -0
@@ -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: b/arch/arm/mach-s3c2440/s3c2442.c
===================================================================

arch/arm/mach-s3c2440/s3c2442.c int __init s3c2442_init(void)

Quoted 10 lines
arch/arm/mach-s3c2440/s3c2442.c +2 -1
@@ -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);
 
--

Looks good to me, applied.
Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.