[PATCH 3/6] mc13xxx: Added dummy definition for mc13xxx_get() if CONFIG_MFD_MC13XXX is not set

Alexander Shiyan shc_work at mail.ru
Thu Jul 19 11:30:14 EDT 2012


Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
 arch/arm/boards/pcm038/pcm038.c |    2 --
 include/mfd/mc13xxx.h           |    4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index fa82b02..875081b 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -124,7 +124,6 @@ static inline uint32_t get_pll_spctl10(void)
  */
 static int pcm038_power_init(void)
 {
-#ifdef CONFIG_MFD_MC13XXX
 	uint32_t spctl0 = get_pll_spctl10();
 	struct mc13xxx *mc13xxx = mc13xxx_get();
 
@@ -158,7 +157,6 @@ static int pcm038_power_init(void)
 			printf("Failed to initialize PMIC. Will continue with low CPU speed\n");
 		}
 	}
-#endif
 
 	/* clock gating enable */
 	GPCR = 0x00050f08;
diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h
index 2880307..51cfdd9 100644
--- a/include/mfd/mc13xxx.h
+++ b/include/mfd/mc13xxx.h
@@ -163,7 +163,11 @@ struct mc13xxx {
 	int			revision;
 };
 
+#ifdef CONFIG_MFD_MC13XXX
 extern struct mc13xxx *mc13xxx_get(void);
+#else
+#define mc13xxx_get()		(NULL)
+#endif
 
 extern int mc13xxx_reg_read(struct mc13xxx *mc13xxx, u8 reg, u32 *val);
 extern int mc13xxx_reg_write(struct mc13xxx *mc13xxx, u8 reg, u32 val);
-- 
1.7.3.4




More information about the barebox mailing list