[PATCH 2/3] mc13xxx: Hide struct mc13xxx from board support code

Alexander Shiyan shc_work at mail.ru
Sat Jul 21 00:50:08 EDT 2012


Board support units should use only provided functions.

Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
 drivers/mfd/mc13xxx.c |   13 +++++++++++++
 include/mfd/mc13xxx.h |   13 +------------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/mfd/mc13xxx.c b/drivers/mfd/mc13xxx.c
index 2934e9d..b1417c8 100644
--- a/drivers/mfd/mc13xxx.c
+++ b/drivers/mfd/mc13xxx.c
@@ -32,6 +32,19 @@
 
 #define DRIVERNAME		"mc13xxx"
 
+enum mc13xxx_mode {
+	MC13XXX_MODE_I2C,
+	MC13XXX_MODE_SPI,
+};
+
+struct mc13xxx {
+	struct cdev		cdev;
+	struct i2c_client	*client;
+	struct spi_device	*spi;
+	enum mc13xxx_mode	mode;
+	int			revision;
+};
+
 #define to_mc13xxx(a)		container_of(a, struct mc13xxx, cdev)
 
 static struct mc13xxx *mc_dev;
diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h
index 632c9fb..f4e3302 100644
--- a/include/mfd/mc13xxx.h
+++ b/include/mfd/mc13xxx.h
@@ -150,18 +150,7 @@
 #define MC13783_SW1B_SOFTSTART		(1 << 17)
 #define MC13783_SW_PLL_FACTOR(x)	(((x) - 28) << 19)
 
-enum mc13xxx_mode {
-	MC13XXX_MODE_I2C,
-	MC13XXX_MODE_SPI,
-};
-
-struct mc13xxx {
-	struct cdev		cdev;
-	struct i2c_client	*client;
-	struct spi_device	*spi;
-	enum mc13xxx_mode	mode;
-	int			revision;
-};
+struct mc13xxx;
 
 #ifdef CONFIG_MFD_MC13XXX
 extern struct mc13xxx *mc13xxx_get(void);
-- 
1.7.3.4




More information about the barebox mailing list