[U-Boot] [PATCH V3 5/7] i2c: s3c24x0: fix the compiler error for exynos4

2017-01-08 Thread Jaehoon Chung
If CONFIG_SYS_I2C_S3C24X0_SLAVE isn't defined, then complie error should
be occurred.
This patch is for preventing it.

Signed-off-by: Jaehoon Chung 
---
 drivers/i2c/s3c24x0_i2c.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 2ece9f4..363cd04 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -24,6 +24,12 @@
 #include 
 #include "s3c24x0_i2c.h"
 
+#ifndef CONFIG_SYS_I2C_S3C24X0_SLAVE
+#define SYS_I2C_S3C24X0_SLAVE_ADDR 0
+#else
+#define SYS_I2C_S3C24X0_SLAVE_ADDR CONFIG_SYS_I2C_S3C24X0_SLAVE
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 /*
@@ -87,7 +93,7 @@ static int s3c24x0_i2c_set_bus_speed(struct udevice *dev, 
unsigned int speed)
i2c_bus->clock_frequency = speed;
 
i2c_ch_init(i2c_bus->regs, i2c_bus->clock_frequency,
-   CONFIG_SYS_I2C_S3C24X0_SLAVE);
+   SYS_I2C_S3C24X0_SLAVE_ADDR);
 
return 0;
 }
-- 
2.10.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 5/7] i2c: s3c24x0: fix the compiler error for exynos4

2017-01-19 Thread Simon Glass
On 8 January 2017 at 22:47, Jaehoon Chung  wrote:
> If CONFIG_SYS_I2C_S3C24X0_SLAVE isn't defined, then complie error should
> be occurred.
> This patch is for preventing it.
>
> Signed-off-by: Jaehoon Chung 
> ---
>  drivers/i2c/s3c24x0_i2c.c | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot