diff mbox

[1/2] i2c: s3c2410: Initialize i2c->gpios[] with requested gpio lines

Message ID 1356581384-23063-1-git-send-email-inderpal.singh@linaro.org
State Not Applicable
Headers show

Commit Message

Inderpal Singh Dec. 27, 2012, 4:09 a.m. UTC
i2c->gpios[] is being used to free_gpios but it's not getting initialized.

Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
---
 drivers/i2c/busses/i2c-s3c2410.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Inderpal Singh Dec. 27, 2012, 4:39 a.m. UTC | #1
On 27 December 2012 09:39, Inderpal Singh <inderpal.singh@linaro.org> wrote:
> i2c->gpios[] is being used to free_gpios but it's not getting initialized.
>
> Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
> ---
>  drivers/i2c/busses/i2c-s3c2410.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
> index a290d08..f1d1f1e 100644
> --- a/drivers/i2c/busses/i2c-s3c2410.c
> +++ b/drivers/i2c/busses/i2c-s3c2410.c
> @@ -875,6 +875,8 @@ static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
>                         dev_err(i2c->dev, "gpio [%d] request failed\n", gpio);
>                         goto free_gpio;
>                 }
> +
> +               i2c->gpios[idx] = gpio;
>         }
>         return 0;
>
> --
> 1.7.9.5
>

Please ignore this patch as this has been sent already at

http://www.mail-archive.com/linux-i2c@vger.kernel.org/msg10781.html

Sorry for the noise !!!
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index a290d08..f1d1f1e 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -875,6 +875,8 @@  static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
 			dev_err(i2c->dev, "gpio [%d] request failed\n", gpio);
 			goto free_gpio;
 		}
+
+		i2c->gpios[idx] = gpio;
 	}
 	return 0;