Skip to contentSkip to conversation

ARM: mach-shmobile: sh7372 A4LC cleanups

PATCH New Magnus Damm 1 participant 1 message Jun 28, 2011

Subsystems (4)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 1/5 ARM: mach-shmobile: sh7372 A4LC cleanups

From: Magnus Damm <[email protected]>

Use &sh7372_a4lc instead of SH7372_A4LC to reduce the amount of code needed to add new power domains.

---

 arch/arm/mach-shmobile/board-mackerel.c      |    6 +++---
 arch/arm/mach-shmobile/include/mach/sh7372.h |    8 ++------
 2 files changed, 5 insertions(+), 9 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +3 -3
@@ -1582,9 +1582,9 @@ static void __init mackerel_init(void)
 
 	platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices));
 
-	sh7372_init_pm_domain(SH7372_A4LC);
-	sh7372_add_device_to_domain(SH7372_A4LC, &lcdc_device);
-	sh7372_add_device_to_domain(SH7372_A4LC, &hdmi_lcdc_device);
+	sh7372_init_pm_domain(&sh7372_a4lc);
+	sh7372_add_device_to_domain(&sh7372_a4lc, &lcdc_device);
+	sh7372_add_device_to_domain(&sh7372_a4lc, &hdmi_lcdc_device);
 
 	hdmi_init_pm_clock();
 	sh7372_pm_init();
arch/arm/mach-shmobile/include/mach/sh7372.h +2 -6
@@ -485,17 +485,13 @@ static inline struct sh7372_pm_domain *t
 
 #ifdef CONFIG_PM
 extern struct sh7372_pm_domain sh7372_a4lc;
-#define SH7372_A4LC	(&sh7372_a4lc)
 
 extern void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd);
 extern void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd,
 					struct platform_device *pdev);
 #else
-#define SH7372_A4LC	NULL
-
-static inline void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) {}
-static inline void sh7372_add_device_to_domain(struct sh7372_pm_domain *pd,
-					       struct platform_device *pdev) {}
+#define sh7372_init_pm_domain(pd) do { } while (0)
+#define sh7372_add_device_to_domain(pd, pdev) do { } while (0)
 #endif /* CONFIG_PM */
 
 #endif /* __ASM_SH7372_H__ */