All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio
@ 2011-12-09 10:03 Tushar Behera
  2011-12-19  4:05 ` Tushar Behera
  0 siblings, 1 reply; 2+ messages in thread
From: Tushar Behera @ 2011-12-09 10:03 UTC (permalink / raw)
  To: linux-i2c, linux-samsung-soc
  Cc: ben-linux, kgene.kim, linaro-dev, patches, thomas.abraham

s3c24xx_i2c_parse_dt_gpio is called when cfg_gpio is not defined
in the platform data of the i2c device. When DT is not enabled,
the above function always returns -EINVAL. Since there can be
some i2c devices which don't need to configure any gpio lines,
the probe of such devices would fail here. Changing the default
return value to success would fix this issue.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
This patch is rebased on Kukjin's for-next branch.
d3d936c "Merge branch 'samsung-fixes-2' into for-next"

 drivers/i2c/busses/i2c-s3c2410.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 2754cef..b5caa42 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -786,7 +786,7 @@ static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
 #else
 static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
 {
-	return -EINVAL;
+	return 0;
 }
 
 static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio
  2011-12-09 10:03 [PATCH] i2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio Tushar Behera
@ 2011-12-19  4:05 ` Tushar Behera
  0 siblings, 0 replies; 2+ messages in thread
From: Tushar Behera @ 2011-12-19  4:05 UTC (permalink / raw)
  To: linux-i2c, linux-samsung-soc
  Cc: ben-linux, kgene.kim, linaro-dev, patches, thomas.abraham

Ping

On 12/09/2011 03:33 PM, Tushar Behera wrote:
> s3c24xx_i2c_parse_dt_gpio is called when cfg_gpio is not defined
> in the platform data of the i2c device. When DT is not enabled,
> the above function always returns -EINVAL. Since there can be
> some i2c devices which don't need to configure any gpio lines,
> the probe of such devices would fail here. Changing the default
> return value to success would fix this issue.
>
> Signed-off-by: Tushar Behera<tushar.behera@linaro.org>
> ---
> This patch is rebased on Kukjin's for-next branch.
> d3d936c "Merge branch 'samsung-fixes-2' into for-next"
>
>   drivers/i2c/busses/i2c-s3c2410.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
> index 2754cef..b5caa42 100644
> --- a/drivers/i2c/busses/i2c-s3c2410.c
> +++ b/drivers/i2c/busses/i2c-s3c2410.c
> @@ -786,7 +786,7 @@ static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
>   #else
>   static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
>   {
> -	return -EINVAL;
> +	return 0;
>   }
>
>   static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)


-- 
Tushar Behera

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-19  4:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-09 10:03 [PATCH] i2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio Tushar Behera
2011-12-19  4:05 ` Tushar Behera

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.