I2C: S3C24X0: Resolve build error for VCMA9
authorRajeshwari Shinde <rajeshwari.s@samsung.com>
Sun, 13 Jan 2013 19:49:36 +0000 (19:49 +0000)
committerMinkyu Kang <mk7.kang@samsung.com>
Mon, 14 Jan 2013 05:45:30 +0000 (14:45 +0900)
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>
drivers/i2c/s3c24x0_i2c.c
drivers/i2c/s3c24x0_i2c.h

index 7ec01ec62f419e4f5b11c97cd79c102395572530..769a2ba5ba32bd77a492647900bc86e5626f89d4 100644 (file)
  * variables to live in SRAM
  */
 static unsigned int g_current_bus __attribute__((section(".data")));
+#ifdef CONFIG_OF_CONTROL
+static int i2c_busses __attribute__((section(".data")));
 static struct s3c24x0_i2c_bus i2c_bus[CONFIG_MAX_I2C_NUM]
                        __attribute__((section(".data")));
-static int i2c_busses __attribute__((section(".data")));
+#endif
 
 #if !(defined CONFIG_EXYNOS4 || defined CONFIG_EXYNOS5)
 static int GetI2CSDA(void)
index 1243bf1b14687a037c7f0a8b3214f60482702281..a56d749dec0adcc3c767552a4d3487211e751dfb 100644 (file)
@@ -35,7 +35,6 @@ struct s3c24x0_i2c_bus {
        int node;       /* device tree node */
        int bus_num;    /* i2c bus number */
        struct s3c24x0_i2c *regs;
-       enum periph_id id;
+       int id;
 };
-
 #endif /* _S3C24X0_I2C_H */