Commit d04df3c6adf7b025d4f68d4f558975d3beb32544

Authored by Rajeshwari Shinde
Committed by Minkyu Kang
1 parent a2468dedef

I2C: S3C24X0: Resolve build error for VCMA9

This patch resolves the following build errors for I2C driver in
VCMA9:

In file included from s3c24x0_i2c.c:40:0:
s3c24x0_i2c.h:38:17: error: field 'id' has incomplete type
s3c24x0_i2c.c:70:39: error: 'CONFIG_MAX_I2C_NUM' undeclared here (not
in a function) s3c24x0_i2c.c:70:31: warning: 'i2c_bus' defined but
not used [-Wunused-variable] s3c24x0_i2c.c:72:12: warning:
'i2c_busses' defined but not used [-Wunused-variable]

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>

Showing 2 changed files with 4 additions and 3 deletions Side-by-side Diff

drivers/i2c/s3c24x0_i2c.c
... ... @@ -67,9 +67,11 @@
67 67 * variables to live in SRAM
68 68 */
69 69 static unsigned int g_current_bus __attribute__((section(".data")));
  70 +#ifdef CONFIG_OF_CONTROL
  71 +static int i2c_busses __attribute__((section(".data")));
70 72 static struct s3c24x0_i2c_bus i2c_bus[CONFIG_MAX_I2C_NUM]
71 73 __attribute__((section(".data")));
72   -static int i2c_busses __attribute__((section(".data")));
  74 +#endif
73 75  
74 76 #if !(defined CONFIG_EXYNOS4 || defined CONFIG_EXYNOS5)
75 77 static int GetI2CSDA(void)
drivers/i2c/s3c24x0_i2c.h
... ... @@ -35,8 +35,7 @@
35 35 int node; /* device tree node */
36 36 int bus_num; /* i2c bus number */
37 37 struct s3c24x0_i2c *regs;
38   - enum periph_id id;
  38 + int id;
39 39 };
40   -
41 40 #endif /* _S3C24X0_I2C_H */