From: Michal Simek Date: Mon, 14 Jul 2008 17:45:35 +0000 (+0200) Subject: i2c: Clean drivers/i2c/ Makefile X-Git-Tag: v2008.10-rc1~161 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a4a549b4b53adf40a0d3882cc30ac812a8f847c5;p=oweals%2Fu-boot.git i2c: Clean drivers/i2c/ Makefile Signed-off-by: Michal Simek --- diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index 534c015191..1f25afb0ad 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -25,11 +25,11 @@ include $(TOPDIR)/config.mk LIB := $(obj)libi2c.a -COBJS-y += fsl_i2c.o -COBJS-y += omap1510_i2c.o -COBJS-y += omap24xx_i2c.o -COBJS-y += tsi108_i2c.o -COBJS-y += mxc_i2c.o +COBJS-$(CONFIG_FSL_I2C) += fsl_i2c.o +COBJS-$(CONFIG_I2C_MXC) += mxc_i2c.o +COBJS-$(CONFIG_DRIVER_OMAP1510_I2C) += omap1510_i2c.o +COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o +COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index 3f78e2f5c8..b7b3a75bc9 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -18,7 +18,6 @@ #include -#ifdef CONFIG_FSL_I2C #ifdef CONFIG_HARD_I2C #include @@ -391,4 +390,3 @@ unsigned int i2c_get_bus_speed(void) } #endif /* CONFIG_HARD_I2C */ -#endif /* CONFIG_FSL_I2C */ diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index a21832944d..1f6ba1f390 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -24,7 +24,7 @@ #include -#if defined(CONFIG_HARD_I2C) && defined (CONFIG_I2C_MXC) +#if defined(CONFIG_HARD_I2C) #include #include diff --git a/drivers/i2c/omap1510_i2c.c b/drivers/i2c/omap1510_i2c.c index 04400fbcd2..388951db1f 100644 --- a/drivers/i2c/omap1510_i2c.c +++ b/drivers/i2c/omap1510_i2c.c @@ -20,8 +20,6 @@ #include -#ifdef CONFIG_DRIVER_OMAP1510_I2C - static void wait_for_bb (void); static u16 wait_for_pin (void); @@ -277,5 +275,3 @@ static u16 wait_for_pin (void) return status; } - -#endif /* CONFIG_DRIVER_OMAP1510_I2C */ diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index 7dab78685d..d16cfb123f 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -22,8 +22,6 @@ #include -#ifdef CONFIG_DRIVER_OMAP24XX_I2C - #include #include @@ -325,5 +323,3 @@ static u16 wait_for_pin (void) } return status; } - -#endif /* CONFIG_DRIVER_OMAP24XX_I2C */ diff --git a/drivers/i2c/tsi108_i2c.c b/drivers/i2c/tsi108_i2c.c index d6736b0477..695e393417 100644 --- a/drivers/i2c/tsi108_i2c.c +++ b/drivers/i2c/tsi108_i2c.c @@ -25,7 +25,6 @@ #include #include -#ifdef CONFIG_TSI108_I2C #include #if defined(CONFIG_CMD_I2C) @@ -280,4 +279,3 @@ int i2c_probe (uchar chip) } #endif -#endif /* CONFIG_TSI108_I2C */