diff mbox

I2C: S3C24X0: Resolve build error for VCMA9

Message ID 1358140664-23237-1-git-send-email-rajeshwari.s@samsung.com
State New
Headers show

Commit Message

Rajeshwari Shinde Jan. 14, 2013, 5:17 a.m. UTC
This patch resolves the build error for I2C driver in
VCMA9.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
---
 drivers/i2c/s3c24x0_i2c.c |    4 +++-
 drivers/i2c/s3c24x0_i2c.h |    3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Minkyu Kang Jan. 14, 2013, 5:24 a.m. UTC | #1
On 14/01/13 14:17, Rajeshwari Shinde wrote:
> This patch resolves the build error for I2C driver in
> VCMA9.

what about errors?

> 
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
>  drivers/i2c/s3c24x0_i2c.c |    4 +++-
>  drivers/i2c/s3c24x0_i2c.h |    3 ++-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
> index 7ec01ec..769a2ba 100644
> --- a/drivers/i2c/s3c24x0_i2c.c
> +++ b/drivers/i2c/s3c24x0_i2c.c
> @@ -67,9 +67,11 @@
>   * 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)
> diff --git a/drivers/i2c/s3c24x0_i2c.h b/drivers/i2c/s3c24x0_i2c.h
> index 1243bf1..c75bcab 100644
> --- a/drivers/i2c/s3c24x0_i2c.h
> +++ b/drivers/i2c/s3c24x0_i2c.h
> @@ -31,11 +31,12 @@ struct s3c24x0_i2c {
>  	u32	iiclc;
>  };
>  
> +#ifdef CONFIG_OF_CONTROL
>  struct s3c24x0_i2c_bus {
>  	int node;	/* device tree node */
>  	int bus_num;	/* i2c bus number */
>  	struct s3c24x0_i2c *regs;
>  	enum periph_id id;

I think int is suitable more than enum.
Currently periph_id is exynos specific.

>  };
> -
> +#endif
>  #endif /* _S3C24X0_I2C_H */
> 

Thanks.
Minkyu Kang.
diff mbox

Patch

diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 7ec01ec..769a2ba 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -67,9 +67,11 @@ 
  * 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)
diff --git a/drivers/i2c/s3c24x0_i2c.h b/drivers/i2c/s3c24x0_i2c.h
index 1243bf1..c75bcab 100644
--- a/drivers/i2c/s3c24x0_i2c.h
+++ b/drivers/i2c/s3c24x0_i2c.h
@@ -31,11 +31,12 @@  struct s3c24x0_i2c {
 	u32	iiclc;
 };
 
+#ifdef CONFIG_OF_CONTROL
 struct s3c24x0_i2c_bus {
 	int node;	/* device tree node */
 	int bus_num;	/* i2c bus number */
 	struct s3c24x0_i2c *regs;
 	enum periph_id id;
 };
-
+#endif
 #endif /* _S3C24X0_I2C_H */