linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: tegra: drop duplicated code for assigning algo
@ 2015-09-07  3:08 Barry Song
  2015-09-21  3:20 ` Barry Song
  2015-10-20 15:40 ` Wolfram Sang
  0 siblings, 2 replies; 4+ messages in thread
From: Barry Song @ 2015-09-07  3:08 UTC (permalink / raw)
  To: wsa-z923LK4zBo2bacvFa/9K2g, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA
  Cc: Barry Song, Donglin Peng

This code is repeated in probe:
i2c_dev->adapter.algo = &tegra_i2c_algo;

Cc: Donglin Peng <pengdonglin137-9Onoh4P/yGk@public.gmane.org>
Signed-off-by: Barry Song <21cnbao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/i2c/busses/i2c-tegra.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 78a3668..9ab720b 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -825,7 +825,6 @@ static int tegra_i2c_probe(struct platform_device *pdev)
 	i2c_dev->adapter.class = I2C_CLASS_DEPRECATED;
 	strlcpy(i2c_dev->adapter.name, "Tegra I2C adapter",
 		sizeof(i2c_dev->adapter.name));
-	i2c_dev->adapter.algo = &tegra_i2c_algo;
 	i2c_dev->adapter.dev.parent = &pdev->dev;
 	i2c_dev->adapter.nr = pdev->id;
 	i2c_dev->adapter.dev.of_node = pdev->dev.of_node;
-- 
1.9.1

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

* Re: [PATCH] i2c: tegra: drop duplicated code for assigning algo
  2015-09-07  3:08 [PATCH] i2c: tegra: drop duplicated code for assigning algo Barry Song
@ 2015-09-21  3:20 ` Barry Song
  2015-10-20 15:40 ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Barry Song @ 2015-09-21  3:20 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c, Laxman Dewangan; +Cc: Barry Song, Donglin Peng

ping...

2015-09-07 11:08 GMT+08:00 Barry Song <21cnbao@gmail.com>:
> This code is repeated in probe:
> i2c_dev->adapter.algo = &tegra_i2c_algo;
>
> Cc: Donglin Peng <pengdonglin137@163.com>
> Signed-off-by: Barry Song <21cnbao@gmail.com>
> ---
>  drivers/i2c/busses/i2c-tegra.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 78a3668..9ab720b 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -825,7 +825,6 @@ static int tegra_i2c_probe(struct platform_device *pdev)
>         i2c_dev->adapter.class = I2C_CLASS_DEPRECATED;
>         strlcpy(i2c_dev->adapter.name, "Tegra I2C adapter",
>                 sizeof(i2c_dev->adapter.name));
> -       i2c_dev->adapter.algo = &tegra_i2c_algo;
>         i2c_dev->adapter.dev.parent = &pdev->dev;
>         i2c_dev->adapter.nr = pdev->id;
>         i2c_dev->adapter.dev.of_node = pdev->dev.of_node;
> --
> 1.9.1
>

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

* Re: [PATCH] i2c: tegra: drop duplicated code for assigning algo
  2015-09-07  3:08 [PATCH] i2c: tegra: drop duplicated code for assigning algo Barry Song
  2015-09-21  3:20 ` Barry Song
@ 2015-10-20 15:40 ` Wolfram Sang
  2015-10-23 20:51   ` Wolfram Sang
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2015-10-20 15:40 UTC (permalink / raw)
  To: Barry Song; +Cc: linux-i2c, ldewangan, Donglin Peng

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

> @@ -825,7 +825,6 @@ static int tegra_i2c_probe(struct platform_device *pdev)
>  	i2c_dev->adapter.class = I2C_CLASS_DEPRECATED;
>  	strlcpy(i2c_dev->adapter.name, "Tegra I2C adapter",
>  		sizeof(i2c_dev->adapter.name));
> -	i2c_dev->adapter.algo = &tegra_i2c_algo;
>  	i2c_dev->adapter.dev.parent = &pdev->dev;
>  	i2c_dev->adapter.nr = pdev->id;
>  	i2c_dev->adapter.dev.of_node = pdev->dev.of_node;

I think it would be more consistent to keep this one and move the quirk
assignment also down here; then all adapter assignments are in one
place.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] i2c: tegra: drop duplicated code for assigning algo
  2015-10-20 15:40 ` Wolfram Sang
@ 2015-10-23 20:51   ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2015-10-23 20:51 UTC (permalink / raw)
  To: Barry Song; +Cc: linux-i2c, ldewangan, Donglin Peng

[-- Attachment #1: Type: text/plain, Size: 713 bytes --]

On Tue, Oct 20, 2015 at 05:40:46PM +0200, Wolfram Sang wrote:
> > @@ -825,7 +825,6 @@ static int tegra_i2c_probe(struct platform_device *pdev)
> >  	i2c_dev->adapter.class = I2C_CLASS_DEPRECATED;
> >  	strlcpy(i2c_dev->adapter.name, "Tegra I2C adapter",
> >  		sizeof(i2c_dev->adapter.name));
> > -	i2c_dev->adapter.algo = &tegra_i2c_algo;
> >  	i2c_dev->adapter.dev.parent = &pdev->dev;
> >  	i2c_dev->adapter.nr = pdev->id;
> >  	i2c_dev->adapter.dev.of_node = pdev->dev.of_node;
> 
> I think it would be more consistent to keep this one and move the quirk
> assignment also down here; then all adapter assignments are in one
> place.

Lucky you, I accidently pushed this out in my for-next ;)


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2015-10-23 20:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07  3:08 [PATCH] i2c: tegra: drop duplicated code for assigning algo Barry Song
2015-09-21  3:20 ` Barry Song
2015-10-20 15:40 ` Wolfram Sang
2015-10-23 20:51   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).