All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: remove obsolete cleanup for clientdata
@ 2010-08-23 15:05 ` Wolfram Sang
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2010-08-23 15:05 UTC (permalink / raw)
  To: linux-i2c
  Cc: Jean Delvare, Wolfram Sang, Andrew Morton, Daniel Mack,
	Jonathan Cameron, Hemanth V, Liam Girdwood, Mark Brown,
	Sonic Zhang, Mike Frysinger, Marek Vasut, Paul Gortmaker,
	Alessandro Zummo, Roy Zang, Jingchang Lu, Mingkai Hu,
	linux-kernel, rtc-linux

A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---

Jean, I dunno if it fits for 2.6.36. It is not precisely a regression.
Though, if it enters with the next merge window, the next set of "faulty"
drivers may come in at the same time...

 drivers/misc/bh1780gli.c               |    1 -
 drivers/regulator/ad5398.c             |    1 -
 drivers/regulator/isl6271a-regulator.c |    2 --
 drivers/rtc/rtc-ds3232.c               |    2 --
 4 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/misc/bh1780gli.c b/drivers/misc/bh1780gli.c
index 714c6b4..d5f3a3f 100644
--- a/drivers/misc/bh1780gli.c
+++ b/drivers/misc/bh1780gli.c
@@ -190,7 +190,6 @@ static int __devexit bh1780_remove(struct i2c_client *client)
 
 	ddata = i2c_get_clientdata(client);
 	sysfs_remove_group(&client->dev.kobj, &bh1780_attr_group);
-	i2c_set_clientdata(client, NULL);
 	kfree(ddata);
 
 	return 0;
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index d59d2f2..15ff61d 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -256,7 +256,6 @@ static int __devexit ad5398_remove(struct i2c_client *client)
 
 	regulator_unregister(&chip->rdev);
 	kfree(chip);
-	i2c_set_clientdata(client, NULL);
 
 	return 0;
 }
diff --git a/drivers/regulator/isl6271a-regulator.c b/drivers/regulator/isl6271a-regulator.c
index e49d2bd..65ecd82 100644
--- a/drivers/regulator/isl6271a-regulator.c
+++ b/drivers/regulator/isl6271a-regulator.c
@@ -191,8 +191,6 @@ static int __devexit isl6271a_remove(struct i2c_client *i2c)
 	struct isl_pmic *pmic = i2c_get_clientdata(i2c);
 	int i;
 
-	i2c_set_clientdata(i2c, NULL);
-
 	for (i = 0; i < 3; i++)
 		regulator_unregister(pmic->rdev[i]);
 
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index 9daed8d..9de8516 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -268,7 +268,6 @@ out_irq:
 		free_irq(client->irq, client);
 
 out_free:
-	i2c_set_clientdata(client, NULL);
 	kfree(ds3232);
 	return ret;
 }
@@ -287,7 +286,6 @@ static int __devexit ds3232_remove(struct i2c_client *client)
 	}
 
 	rtc_device_unregister(ds3232->rtc);
-	i2c_set_clientdata(client, NULL);
 	kfree(ds3232);
 	return 0;
 }
-- 
1.7.1


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

* [PATCH] i2c: remove obsolete cleanup for clientdata
@ 2010-08-23 15:05 ` Wolfram Sang
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2010-08-23 15:05 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
  Cc: Jean Delvare, Wolfram Sang, Andrew Morton, Daniel Mack,
	Jonathan Cameron, Hemanth V, Liam Girdwood, Mark Brown,
	Sonic Zhang, Mike Frysinger, Marek Vasut, Paul Gortmaker,
	Alessandro Zummo, Roy Zang, Jingchang Lu, Mingkai Hu,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw

A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---

Jean, I dunno if it fits for 2.6.36. It is not precisely a regression.
Though, if it enters with the next merge window, the next set of "faulty"
drivers may come in at the same time...

 drivers/misc/bh1780gli.c               |    1 -
 drivers/regulator/ad5398.c             |    1 -
 drivers/regulator/isl6271a-regulator.c |    2 --
 drivers/rtc/rtc-ds3232.c               |    2 --
 4 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/misc/bh1780gli.c b/drivers/misc/bh1780gli.c
index 714c6b4..d5f3a3f 100644
--- a/drivers/misc/bh1780gli.c
+++ b/drivers/misc/bh1780gli.c
@@ -190,7 +190,6 @@ static int __devexit bh1780_remove(struct i2c_client *client)
 
 	ddata = i2c_get_clientdata(client);
 	sysfs_remove_group(&client->dev.kobj, &bh1780_attr_group);
-	i2c_set_clientdata(client, NULL);
 	kfree(ddata);
 
 	return 0;
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index d59d2f2..15ff61d 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -256,7 +256,6 @@ static int __devexit ad5398_remove(struct i2c_client *client)
 
 	regulator_unregister(&chip->rdev);
 	kfree(chip);
-	i2c_set_clientdata(client, NULL);
 
 	return 0;
 }
diff --git a/drivers/regulator/isl6271a-regulator.c b/drivers/regulator/isl6271a-regulator.c
index e49d2bd..65ecd82 100644
--- a/drivers/regulator/isl6271a-regulator.c
+++ b/drivers/regulator/isl6271a-regulator.c
@@ -191,8 +191,6 @@ static int __devexit isl6271a_remove(struct i2c_client *i2c)
 	struct isl_pmic *pmic = i2c_get_clientdata(i2c);
 	int i;
 
-	i2c_set_clientdata(i2c, NULL);
-
 	for (i = 0; i < 3; i++)
 		regulator_unregister(pmic->rdev[i]);
 
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index 9daed8d..9de8516 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -268,7 +268,6 @@ out_irq:
 		free_irq(client->irq, client);
 
 out_free:
-	i2c_set_clientdata(client, NULL);
 	kfree(ds3232);
 	return ret;
 }
@@ -287,7 +286,6 @@ static int __devexit ds3232_remove(struct i2c_client *client)
 	}
 
 	rtc_device_unregister(ds3232->rtc);
-	i2c_set_clientdata(client, NULL);
 	kfree(ds3232);
 	return 0;
 }
-- 
1.7.1

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

* Re: [PATCH] i2c: remove obsolete cleanup for clientdata
@ 2010-08-23 15:22   ` Mark Brown
  0 siblings, 0 replies; 19+ messages in thread
From: Mark Brown @ 2010-08-23 15:22 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Jean Delvare, Andrew Morton, Daniel Mack,
	Jonathan Cameron, Hemanth V, Liam Girdwood, Sonic Zhang,
	Mike Frysinger, Marek Vasut, Paul Gortmaker, Alessandro Zummo,
	Roy Zang, Jingchang Lu, Mingkai Hu, linux-kernel, rtc-linux

On Mon, Aug 23, 2010 at 05:05:08PM +0200, Wolfram Sang wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

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

* Re: [PATCH] i2c: remove obsolete cleanup for clientdata
@ 2010-08-23 15:22   ` Mark Brown
  0 siblings, 0 replies; 19+ messages in thread
From: Mark Brown @ 2010-08-23 15:22 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Jean Delvare, Andrew Morton,
	Daniel Mack, Jonathan Cameron, Hemanth V, Liam Girdwood,
	Sonic Zhang, Mike Frysinger, Marek Vasut, Paul Gortmaker,
	Alessandro Zummo, Roy Zang, Jingchang Lu, Mingkai Hu,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw

On Mon, Aug 23, 2010 at 05:05:08PM +0200, Wolfram Sang wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.
> 
> Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

Acked-by: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>

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

* Re: [PATCH] i2c: remove obsolete cleanup for clientdata
@ 2010-08-23 19:03   ` Jean Delvare
  0 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2010-08-23 19:03 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Andrew Morton, Daniel Mack, Jonathan Cameron,
	Hemanth V, Liam Girdwood, Mark Brown, Sonic Zhang,
	Mike Frysinger, Marek Vasut, Paul Gortmaker, Alessandro Zummo,
	Roy Zang, Jingchang Lu, Mingkai Hu, linux-kernel, rtc-linux

On Mon, 23 Aug 2010 17:05:08 +0200, Wolfram Sang wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> ---
> 
> Jean, I dunno if it fits for 2.6.36. It is not precisely a regression.
> Though, if it enters with the next merge window, the next set of "faulty"
> drivers may come in at the same time...

Applied, and queued for 2.6.36. I agree that this kind of cleanup fits
well as an exception to the bugfix-only rule.

-- 
Jean Delvare

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

* Re: [PATCH] i2c: remove obsolete cleanup for clientdata
@ 2010-08-23 19:03   ` Jean Delvare
  0 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2010-08-23 19:03 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Andrew Morton, Daniel Mack,
	Jonathan Cameron, Hemanth V, Liam Girdwood, Mark Brown,
	Sonic Zhang, Mike Frysinger, Marek Vasut, Paul Gortmaker,
	Alessandro Zummo, Roy Zang, Jingchang Lu, Mingkai Hu,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw

On Mon, 23 Aug 2010 17:05:08 +0200, Wolfram Sang wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.
> 
> Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> 
> Jean, I dunno if it fits for 2.6.36. It is not precisely a regression.
> Though, if it enters with the next merge window, the next set of "faulty"
> drivers may come in at the same time...

Applied, and queued for 2.6.36. I agree that this kind of cleanup fits
well as an exception to the bugfix-only rule.

-- 
Jean Delvare

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

* Re: [PATCH] i2c: remove obsolete cleanup for clientdata
@ 2010-08-23 21:58   ` Mike Frysinger
  0 siblings, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2010-08-23 21:58 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Jean Delvare, Andrew Morton, Daniel Mack,
	Jonathan Cameron, Hemanth V, Liam Girdwood, Mark Brown,
	Sonic Zhang, Marek Vasut, Paul Gortmaker, Alessandro Zummo,
	Roy Zang, Jingchang Lu, Mingkai Hu, linux-kernel, rtc-linux

On Mon, Aug 23, 2010 at 11:05, Wolfram Sang <wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

on a related note, do we need to clear it when erroring at probe time
?  doesnt seem like that is necessary either ...
-mike

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

* Re: [PATCH] i2c: remove obsolete cleanup for clientdata
@ 2010-08-23 21:58   ` Mike Frysinger
  0 siblings, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2010-08-23 21:58 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Jean Delvare, Andrew Morton,
	Daniel Mack, Jonathan Cameron, Hemanth V, Liam Girdwood,
	Mark Brown, Sonic Zhang, Marek Vasut, Paul Gortmaker,
	Alessandro Zummo, Roy Zang, Jingchang Lu, Mingkai Hu,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw

On Mon, Aug 23, 2010 at 11:05, Wolfram Sang <wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

on a related note, do we need to clear it when erroring at probe time
?  doesnt seem like that is necessary either ...
-mike

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

* Re: [PATCH] i2c: remove obsolete cleanup for clientdata
@ 2010-08-24  5:16     ` Wolfram Sang
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2010-08-24  5:16 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: linux-i2c, Jean Delvare, Andrew Morton, Daniel Mack,
	Jonathan Cameron, Hemanth V, Liam Girdwood, Mark Brown,
	Sonic Zhang, Marek Vasut, Paul Gortmaker, Alessandro Zummo,
	Roy Zang, Jingchang Lu, Mingkai Hu, linux-kernel, rtc-linux

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

On Mon, Aug 23, 2010 at 05:58:17PM -0400, Mike Frysinger wrote:
> On Mon, Aug 23, 2010 at 11:05, Wolfram Sang <wrote:
> > A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> > on exit. This is obsolete meanwhile, so fix it and hope the word will spread.
> 
> on a related note, do we need to clear it when erroring at probe time
> ?  doesnt seem like that is necessary either ...

Correct, you don't have to. The core will do it.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

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

* Re: [PATCH] i2c: remove obsolete cleanup for clientdata
@ 2010-08-24  5:16     ` Wolfram Sang
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2010-08-24  5:16 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Jean Delvare, Andrew Morton,
	Daniel Mack, Jonathan Cameron, Hemanth V, Liam Girdwood,
	Mark Brown, Sonic Zhang, Marek Vasut, Paul Gortmaker,
	Alessandro Zummo, Roy Zang, Jingchang Lu, Mingkai Hu,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw

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

On Mon, Aug 23, 2010 at 05:58:17PM -0400, Mike Frysinger wrote:
> On Mon, Aug 23, 2010 at 11:05, Wolfram Sang <wrote:
> > A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> > on exit. This is obsolete meanwhile, so fix it and hope the word will spread.
> 
> on a related note, do we need to clear it when erroring at probe time
> ?  doesnt seem like that is necessary either ...

Correct, you don't have to. The core will do it.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

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

* Re: [PATCH] i2c: Remove obsolete cleanup for clientdata
       [not found] ` <1289392100-32668-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-11-11  0:25   ` Greg KH
  0 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2010-11-11  0:25 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, devel, Hong Liu, Janusz Krzysztofik, linux-kernel,
	Greg Kroah-Hartman, Mauro Carvalho Chehab, Anantha Narayanan,
	Andres Salomon, Andrew Morton, linux-media,
	Guennadi Liakhovetski, Alan Cox

On Wed, Nov 10, 2010 at 01:28:19PM +0100, Wolfram Sang wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> ---
> 
> Like last time I suggest to collect acks from the driver authors and merge it
> vie Jean's i2c-tree.
> 
>  drivers/media/video/imx074.c          |    2 --
>  drivers/media/video/ov6650.c          |    2 --
>  drivers/misc/apds9802als.c            |    1 -
>  drivers/staging/olpc_dcon/olpc_dcon.c |    3 ---
>  4 files changed, 0 insertions(+), 8 deletions(-)

For the staging driver:
	Acked-by: Greg Kroah-Hartman <gregkh@suse.de>

thanks,

greg k-h

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

* Re: [PATCH] i2c: Remove obsolete cleanup for clientdata
@ 2010-11-11  0:25   ` Greg KH
  0 siblings, 0 replies; 19+ messages in thread
From: Greg KH @ 2010-11-11  0:25 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b, Hong Liu,
	Janusz Krzysztofik, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Greg Kroah-Hartman, Mauro Carvalho Chehab, Anantha Narayanan,
	Andres Salomon, Andrew Morton,
	linux-media-u79uwXL29TY76Z2rM5mHXA, Guennadi Liakhovetski,
	Alan Cox

On Wed, Nov 10, 2010 at 01:28:19PM +0100, Wolfram Sang wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.
> 
> Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> 
> Like last time I suggest to collect acks from the driver authors and merge it
> vie Jean's i2c-tree.
> 
>  drivers/media/video/imx074.c          |    2 --
>  drivers/media/video/ov6650.c          |    2 --
>  drivers/misc/apds9802als.c            |    1 -
>  drivers/staging/olpc_dcon/olpc_dcon.c |    3 ---
>  4 files changed, 0 insertions(+), 8 deletions(-)

For the staging driver:
	Acked-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>

thanks,

greg k-h

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

* Re: [PATCH] i2c: Remove obsolete cleanup for clientdata
       [not found] ` <1289392100-32668-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-11-10 13:24   ` Jean Delvare
  0 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2010-11-10 13:24 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Guennadi Liakhovetski, Janusz Krzysztofik, Andrew Morton,
	Hong Liu, Alan Cox, Anantha Narayanan, Andres Salomon,
	linux-media, linux-kernel, devel

Hi Wolfram,

On Wed, 10 Nov 2010 13:28:19 +0100, Wolfram Sang wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

Thanks for actively tracking these.

> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> ---
> 
> Like last time I suggest to collect acks from the driver authors and merge it
> vie Jean's i2c-tree.
> 
>  drivers/media/video/imx074.c          |    2 --
>  drivers/media/video/ov6650.c          |    2 --
>  drivers/misc/apds9802als.c            |    1 -
>  drivers/staging/olpc_dcon/olpc_dcon.c |    3 ---
>  4 files changed, 0 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/media/video/imx074.c b/drivers/media/video/imx074.c
> index 380e459..27b5dfd 100644
> --- a/drivers/media/video/imx074.c
> +++ b/drivers/media/video/imx074.c
> @@ -451,7 +451,6 @@ static int imx074_probe(struct i2c_client *client,
>  	ret = imx074_video_probe(icd, client);
>  	if (ret < 0) {
>  		icd->ops = NULL;
> -		i2c_set_clientdata(client, NULL);
>  		kfree(priv);
>  		return ret;
>  	}
> @@ -468,7 +467,6 @@ static int imx074_remove(struct i2c_client *client)
>  	icd->ops = NULL;
>  	if (icl->free_bus)
>  		icl->free_bus(icl);
> -	i2c_set_clientdata(client, NULL);
>  	client->driver = NULL;

This statement seems equally unneeded, maybe you could remove it too?

Unless you want to provide a separate patch for this, as there are 5
other drivers doing the same.

-- 
Jean Delvare

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

* Re: [PATCH] i2c: Remove obsolete cleanup for clientdata
@ 2010-11-10 13:24   ` Jean Delvare
  0 siblings, 0 replies; 19+ messages in thread
From: Jean Delvare @ 2010-11-10 13:24 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Guennadi Liakhovetski, Janusz Krzysztofik,
	Andrew Morton, Hong Liu, Alan Cox, Anantha Narayanan,
	Andres Salomon, linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b

Hi Wolfram,

On Wed, 10 Nov 2010 13:28:19 +0100, Wolfram Sang wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

Thanks for actively tracking these.

> Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> 
> Like last time I suggest to collect acks from the driver authors and merge it
> vie Jean's i2c-tree.
> 
>  drivers/media/video/imx074.c          |    2 --
>  drivers/media/video/ov6650.c          |    2 --
>  drivers/misc/apds9802als.c            |    1 -
>  drivers/staging/olpc_dcon/olpc_dcon.c |    3 ---
>  4 files changed, 0 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/media/video/imx074.c b/drivers/media/video/imx074.c
> index 380e459..27b5dfd 100644
> --- a/drivers/media/video/imx074.c
> +++ b/drivers/media/video/imx074.c
> @@ -451,7 +451,6 @@ static int imx074_probe(struct i2c_client *client,
>  	ret = imx074_video_probe(icd, client);
>  	if (ret < 0) {
>  		icd->ops = NULL;
> -		i2c_set_clientdata(client, NULL);
>  		kfree(priv);
>  		return ret;
>  	}
> @@ -468,7 +467,6 @@ static int imx074_remove(struct i2c_client *client)
>  	icd->ops = NULL;
>  	if (icl->free_bus)
>  		icl->free_bus(icl);
> -	i2c_set_clientdata(client, NULL);
>  	client->driver = NULL;

This statement seems equally unneeded, maybe you could remove it too?

Unless you want to provide a separate patch for this, as there are 5
other drivers doing the same.

-- 
Jean Delvare

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

* Re: [PATCH] i2c: Remove obsolete cleanup for clientdata
       [not found] ` <1289392100-32668-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-11-10 13:01   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 19+ messages in thread
From: Guennadi Liakhovetski @ 2010-11-10 13:01 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Janusz Krzysztofik, Andrew Morton, Hong Liu, Alan Cox,
	Anantha Narayanan, Andres Salomon, linux-media, linux-kernel,
	devel

On Wed, 10 Nov 2010, Wolfram Sang wrote:

> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>

for imx074 and ov6650:

Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Thanks
Guennadi

> ---
> 
> Like last time I suggest to collect acks from the driver authors and merge it
> vie Jean's i2c-tree.
> 
>  drivers/media/video/imx074.c          |    2 --
>  drivers/media/video/ov6650.c          |    2 --
>  drivers/misc/apds9802als.c            |    1 -
>  drivers/staging/olpc_dcon/olpc_dcon.c |    3 ---
>  4 files changed, 0 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/media/video/imx074.c b/drivers/media/video/imx074.c
> index 380e459..27b5dfd 100644
> --- a/drivers/media/video/imx074.c
> +++ b/drivers/media/video/imx074.c
> @@ -451,7 +451,6 @@ static int imx074_probe(struct i2c_client *client,
>  	ret = imx074_video_probe(icd, client);
>  	if (ret < 0) {
>  		icd->ops = NULL;
> -		i2c_set_clientdata(client, NULL);
>  		kfree(priv);
>  		return ret;
>  	}
> @@ -468,7 +467,6 @@ static int imx074_remove(struct i2c_client *client)
>  	icd->ops = NULL;
>  	if (icl->free_bus)
>  		icl->free_bus(icl);
> -	i2c_set_clientdata(client, NULL);
>  	client->driver = NULL;
>  	kfree(priv);
>  
> diff --git a/drivers/media/video/ov6650.c b/drivers/media/video/ov6650.c
> index b7cfeab..2dd5298 100644
> --- a/drivers/media/video/ov6650.c
> +++ b/drivers/media/video/ov6650.c
> @@ -1176,7 +1176,6 @@ static int ov6650_probe(struct i2c_client *client,
>  
>  	if (ret) {
>  		icd->ops = NULL;
> -		i2c_set_clientdata(client, NULL);
>  		kfree(priv);
>  	}
>  
> @@ -1187,7 +1186,6 @@ static int ov6650_remove(struct i2c_client *client)
>  {
>  	struct ov6650 *priv = to_ov6650(client);
>  
> -	i2c_set_clientdata(client, NULL);
>  	kfree(priv);
>  	return 0;
>  }
> diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
> index f9b91ba..abe3d21 100644
> --- a/drivers/misc/apds9802als.c
> +++ b/drivers/misc/apds9802als.c
> @@ -251,7 +251,6 @@ static int apds9802als_probe(struct i2c_client *client,
>  
>  	return res;
>  als_error1:
> -	i2c_set_clientdata(client, NULL);
>  	kfree(data);
>  	return res;
>  }
> diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
> index 75aa7a36..f286a4c 100644
> --- a/drivers/staging/olpc_dcon/olpc_dcon.c
> +++ b/drivers/staging/olpc_dcon/olpc_dcon.c
> @@ -733,7 +733,6 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id)
>   edev:
>  	platform_device_unregister(dcon_device);
>  	dcon_device = NULL;
> -	i2c_set_clientdata(client, NULL);
>   eirq:
>  	free_irq(DCON_IRQ, &dcon_driver);
>   einit:
> @@ -757,8 +756,6 @@ static int dcon_remove(struct i2c_client *client)
>  		platform_device_unregister(dcon_device);
>  	cancel_work_sync(&dcon_work);
>  
> -	i2c_set_clientdata(client, NULL);
> -
>  	return 0;
>  }
>  
> -- 
> 1.7.2.3
> 
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: [PATCH] i2c: Remove obsolete cleanup for clientdata
@ 2010-11-10 13:01   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 19+ messages in thread
From: Guennadi Liakhovetski @ 2010-11-10 13:01 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Janusz Krzysztofik, Andrew Morton, Hong Liu,
	Alan Cox, Anantha Narayanan, Andres Salomon,
	linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b

On Wed, 10 Nov 2010, Wolfram Sang wrote:

> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit. This is obsolete meanwhile, so fix it and hope the word will spread.
> 
> Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

for imx074 and ov6650:

Acked-by: Guennadi Liakhovetski <g.liakhovetski-Mmb7MZpHnFY@public.gmane.org>

Thanks
Guennadi

> ---
> 
> Like last time I suggest to collect acks from the driver authors and merge it
> vie Jean's i2c-tree.
> 
>  drivers/media/video/imx074.c          |    2 --
>  drivers/media/video/ov6650.c          |    2 --
>  drivers/misc/apds9802als.c            |    1 -
>  drivers/staging/olpc_dcon/olpc_dcon.c |    3 ---
>  4 files changed, 0 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/media/video/imx074.c b/drivers/media/video/imx074.c
> index 380e459..27b5dfd 100644
> --- a/drivers/media/video/imx074.c
> +++ b/drivers/media/video/imx074.c
> @@ -451,7 +451,6 @@ static int imx074_probe(struct i2c_client *client,
>  	ret = imx074_video_probe(icd, client);
>  	if (ret < 0) {
>  		icd->ops = NULL;
> -		i2c_set_clientdata(client, NULL);
>  		kfree(priv);
>  		return ret;
>  	}
> @@ -468,7 +467,6 @@ static int imx074_remove(struct i2c_client *client)
>  	icd->ops = NULL;
>  	if (icl->free_bus)
>  		icl->free_bus(icl);
> -	i2c_set_clientdata(client, NULL);
>  	client->driver = NULL;
>  	kfree(priv);
>  
> diff --git a/drivers/media/video/ov6650.c b/drivers/media/video/ov6650.c
> index b7cfeab..2dd5298 100644
> --- a/drivers/media/video/ov6650.c
> +++ b/drivers/media/video/ov6650.c
> @@ -1176,7 +1176,6 @@ static int ov6650_probe(struct i2c_client *client,
>  
>  	if (ret) {
>  		icd->ops = NULL;
> -		i2c_set_clientdata(client, NULL);
>  		kfree(priv);
>  	}
>  
> @@ -1187,7 +1186,6 @@ static int ov6650_remove(struct i2c_client *client)
>  {
>  	struct ov6650 *priv = to_ov6650(client);
>  
> -	i2c_set_clientdata(client, NULL);
>  	kfree(priv);
>  	return 0;
>  }
> diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
> index f9b91ba..abe3d21 100644
> --- a/drivers/misc/apds9802als.c
> +++ b/drivers/misc/apds9802als.c
> @@ -251,7 +251,6 @@ static int apds9802als_probe(struct i2c_client *client,
>  
>  	return res;
>  als_error1:
> -	i2c_set_clientdata(client, NULL);
>  	kfree(data);
>  	return res;
>  }
> diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
> index 75aa7a36..f286a4c 100644
> --- a/drivers/staging/olpc_dcon/olpc_dcon.c
> +++ b/drivers/staging/olpc_dcon/olpc_dcon.c
> @@ -733,7 +733,6 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id)
>   edev:
>  	platform_device_unregister(dcon_device);
>  	dcon_device = NULL;
> -	i2c_set_clientdata(client, NULL);
>   eirq:
>  	free_irq(DCON_IRQ, &dcon_driver);
>   einit:
> @@ -757,8 +756,6 @@ static int dcon_remove(struct i2c_client *client)
>  		platform_device_unregister(dcon_device);
>  	cancel_work_sync(&dcon_work);
>  
> -	i2c_set_clientdata(client, NULL);
> -
>  	return 0;
>  }
>  
> -- 
> 1.7.2.3
> 
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* [PATCH] i2c: Remove obsolete cleanup for clientdata
@ 2010-11-10 12:28 ` Wolfram Sang
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2010-11-10 12:28 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Guennadi Liakhovetski, Janusz Krzysztofik, Andrew Morton,
	Hong Liu, Alan Cox, Anantha Narayanan, Andres Salomon,
	linux-media, linux-kernel, devel

A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---

Like last time I suggest to collect acks from the driver authors and merge it
vie Jean's i2c-tree.

 drivers/media/video/imx074.c          |    2 --
 drivers/media/video/ov6650.c          |    2 --
 drivers/misc/apds9802als.c            |    1 -
 drivers/staging/olpc_dcon/olpc_dcon.c |    3 ---
 4 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/media/video/imx074.c b/drivers/media/video/imx074.c
index 380e459..27b5dfd 100644
--- a/drivers/media/video/imx074.c
+++ b/drivers/media/video/imx074.c
@@ -451,7 +451,6 @@ static int imx074_probe(struct i2c_client *client,
 	ret = imx074_video_probe(icd, client);
 	if (ret < 0) {
 		icd->ops = NULL;
-		i2c_set_clientdata(client, NULL);
 		kfree(priv);
 		return ret;
 	}
@@ -468,7 +467,6 @@ static int imx074_remove(struct i2c_client *client)
 	icd->ops = NULL;
 	if (icl->free_bus)
 		icl->free_bus(icl);
-	i2c_set_clientdata(client, NULL);
 	client->driver = NULL;
 	kfree(priv);
 
diff --git a/drivers/media/video/ov6650.c b/drivers/media/video/ov6650.c
index b7cfeab..2dd5298 100644
--- a/drivers/media/video/ov6650.c
+++ b/drivers/media/video/ov6650.c
@@ -1176,7 +1176,6 @@ static int ov6650_probe(struct i2c_client *client,
 
 	if (ret) {
 		icd->ops = NULL;
-		i2c_set_clientdata(client, NULL);
 		kfree(priv);
 	}
 
@@ -1187,7 +1186,6 @@ static int ov6650_remove(struct i2c_client *client)
 {
 	struct ov6650 *priv = to_ov6650(client);
 
-	i2c_set_clientdata(client, NULL);
 	kfree(priv);
 	return 0;
 }
diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
index f9b91ba..abe3d21 100644
--- a/drivers/misc/apds9802als.c
+++ b/drivers/misc/apds9802als.c
@@ -251,7 +251,6 @@ static int apds9802als_probe(struct i2c_client *client,
 
 	return res;
 als_error1:
-	i2c_set_clientdata(client, NULL);
 	kfree(data);
 	return res;
 }
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 75aa7a36..f286a4c 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -733,7 +733,6 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id)
  edev:
 	platform_device_unregister(dcon_device);
 	dcon_device = NULL;
-	i2c_set_clientdata(client, NULL);
  eirq:
 	free_irq(DCON_IRQ, &dcon_driver);
  einit:
@@ -757,8 +756,6 @@ static int dcon_remove(struct i2c_client *client)
 		platform_device_unregister(dcon_device);
 	cancel_work_sync(&dcon_work);
 
-	i2c_set_clientdata(client, NULL);
-
 	return 0;
 }
 
-- 
1.7.2.3


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

* [PATCH] i2c: Remove obsolete cleanup for clientdata
@ 2010-11-10 12:28 ` Wolfram Sang
  0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2010-11-10 12:28 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
  Cc: Wolfram Sang, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Guennadi Liakhovetski, Janusz Krzysztofik, Andrew Morton,
	Hong Liu, Alan Cox, Anantha Narayanan, Andres Salomon,
	linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b

A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---

Like last time I suggest to collect acks from the driver authors and merge it
vie Jean's i2c-tree.

 drivers/media/video/imx074.c          |    2 --
 drivers/media/video/ov6650.c          |    2 --
 drivers/misc/apds9802als.c            |    1 -
 drivers/staging/olpc_dcon/olpc_dcon.c |    3 ---
 4 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/media/video/imx074.c b/drivers/media/video/imx074.c
index 380e459..27b5dfd 100644
--- a/drivers/media/video/imx074.c
+++ b/drivers/media/video/imx074.c
@@ -451,7 +451,6 @@ static int imx074_probe(struct i2c_client *client,
 	ret = imx074_video_probe(icd, client);
 	if (ret < 0) {
 		icd->ops = NULL;
-		i2c_set_clientdata(client, NULL);
 		kfree(priv);
 		return ret;
 	}
@@ -468,7 +467,6 @@ static int imx074_remove(struct i2c_client *client)
 	icd->ops = NULL;
 	if (icl->free_bus)
 		icl->free_bus(icl);
-	i2c_set_clientdata(client, NULL);
 	client->driver = NULL;
 	kfree(priv);
 
diff --git a/drivers/media/video/ov6650.c b/drivers/media/video/ov6650.c
index b7cfeab..2dd5298 100644
--- a/drivers/media/video/ov6650.c
+++ b/drivers/media/video/ov6650.c
@@ -1176,7 +1176,6 @@ static int ov6650_probe(struct i2c_client *client,
 
 	if (ret) {
 		icd->ops = NULL;
-		i2c_set_clientdata(client, NULL);
 		kfree(priv);
 	}
 
@@ -1187,7 +1186,6 @@ static int ov6650_remove(struct i2c_client *client)
 {
 	struct ov6650 *priv = to_ov6650(client);
 
-	i2c_set_clientdata(client, NULL);
 	kfree(priv);
 	return 0;
 }
diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
index f9b91ba..abe3d21 100644
--- a/drivers/misc/apds9802als.c
+++ b/drivers/misc/apds9802als.c
@@ -251,7 +251,6 @@ static int apds9802als_probe(struct i2c_client *client,
 
 	return res;
 als_error1:
-	i2c_set_clientdata(client, NULL);
 	kfree(data);
 	return res;
 }
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 75aa7a36..f286a4c 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -733,7 +733,6 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id)
  edev:
 	platform_device_unregister(dcon_device);
 	dcon_device = NULL;
-	i2c_set_clientdata(client, NULL);
  eirq:
 	free_irq(DCON_IRQ, &dcon_driver);
  einit:
@@ -757,8 +756,6 @@ static int dcon_remove(struct i2c_client *client)
 		platform_device_unregister(dcon_device);
 	cancel_work_sync(&dcon_work);
 
-	i2c_set_clientdata(client, NULL);
-
 	return 0;
 }
 
-- 
1.7.2.3

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

* Re: [PATCH] i2c: Remove obsolete cleanup for clientdata
       [not found] ` <1289392100-32668-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-11-10 12:10   ` Alan Cox
  0 siblings, 0 replies; 19+ messages in thread
From: Alan Cox @ 2010-11-10 12:10 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

> --- a/drivers/misc/apds9802als.c
> +++ b/drivers/misc/apds9802als.c
> @@ -251,7 +251,6 @@ static int apds9802als_probe(struct i2c_client
> *client, 
>  	return res;
>  als_error1:
> -	i2c_set_clientdata(client, NULL);
>  	kfree(data);
>  	return res;
>  }

Acked-by: Alan Cox <alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

and noted for the future

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

end of thread, other threads:[~2010-11-11  0:36 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-23 15:05 [PATCH] i2c: remove obsolete cleanup for clientdata Wolfram Sang
2010-08-23 15:05 ` Wolfram Sang
2010-08-23 15:22 ` Mark Brown
2010-08-23 15:22   ` Mark Brown
2010-08-23 19:03 ` Jean Delvare
2010-08-23 19:03   ` Jean Delvare
2010-08-23 21:58 ` Mike Frysinger
2010-08-23 21:58   ` Mike Frysinger
2010-08-24  5:16   ` Wolfram Sang
2010-08-24  5:16     ` Wolfram Sang
2010-11-10 12:28 [PATCH] i2c: Remove " Wolfram Sang
2010-11-10 12:28 ` Wolfram Sang
     [not found] ` <1289392100-32668-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-11-10 12:10   ` Alan Cox
2010-11-10 13:01 ` Guennadi Liakhovetski
2010-11-10 13:01   ` Guennadi Liakhovetski
2010-11-10 13:24 ` Jean Delvare
2010-11-10 13:24   ` Jean Delvare
2010-11-11  0:25 ` Greg KH
2010-11-11  0:25   ` Greg KH

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.