Skip to contentSkip to conversation

ALSA: aoa: Remove obsolete cleanup for clientdata

PATCH Superseded Axel Lin 3 participants 5 messages Sep 9, 2011 – Sep 12, 2011

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 ALSA: aoa: Remove obsolete cleanup for clientdata

The i2c core will clear the clientdata pointer automatically. We don't have to set the `data' field to NULL in remove() or if probe() failed anymore.

---
 sound/aoa/codecs/onyx.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
sound/aoa/codecs/onyx.c +0 -1
index 3687a6c..571f668 100644
@@ -1067,7 +1067,6 @@ static int onyx_i2c_probe(struct i2c_client *client,
 	printk(KERN_DEBUG PFX "created and attached onyx instance\n");
 	return 0;
  fail:
-	i2c_set_clientdata(client, NULL);
 	kfree(onyx);
 	return -ENODEV;
 }
Signature · 1 line
1.7.4.1
author
#1 lore raw

PATCH 2/2 ALSA: keywest: Remove obsolete cleanup for clientdata

The i2c core will clear the clientdata pointer automatically. We don't have to set the `data' field to NULL in remove() or if probe() failed anymore.

---
 sound/ppc/keywest.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
sound/ppc/keywest.c +0 -1
index 8f064c7..4080bec 100644
@@ -82,7 +82,6 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
 
 static int keywest_remove(struct i2c_client *client)
 {
-	i2c_set_clientdata(client, NULL);
 	if (! keywest_ctx)
 		return 0;
 	if (client == keywest_ctx->client)
Signature · 1 line
1.7.4.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] ALSA: keywest: Remove obsolete cleanup for clientdata

Quoted 5 lines · Axel Lin

The i2c core will clear the clientdata pointer automatically. We don't have to set the `data' field to NULL in remove() or if probe() failed anymore.

There is (at least) one

if (ptr)

	kfree(ptr);

in this driver. Maybe you could fix this, too, while you are here.

And there is soc/codecs/tpa6130a2.c waiting to be fixed as well :)

Quoted 21 lines
---
 sound/ppc/keywest.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
sound/ppc/keywest.c +0 -1
index 8f064c7..4080bec 100644
@@ -82,7 +82,6 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
 
 static int keywest_remove(struct i2c_client *client)
 {
-	i2c_set_clientdata(client, NULL);
 	if (! keywest_ctx)
 		return 0;
 	if (client == keywest_ctx->client)
Signature · 1 line
1.7.4.1
Signature · 2 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#3 lore raw

Re: [PATCH 2/2] ALSA: keywest: Remove obsolete cleanup for clientdata

In reply to Axel Lin

At Fri, 09 Sep 2011 17:50:52 +0800,

Quoted 6 lines · Axel Lin

The i2c core will clear the clientdata pointer automatically. We don't have to set the `data' field to NULL in remove() or if probe() failed anymore.

Applied now. Thanks.

Takashi

Quoted 21 lines
---
 sound/ppc/keywest.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
sound/ppc/keywest.c +0 -1
index 8f064c7..4080bec 100644
@@ -82,7 +82,6 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
 
 static int keywest_remove(struct i2c_client *client)
 {
-	i2c_set_clientdata(client, NULL);
 	if (! keywest_ctx)
 		return 0;
 	if (client == keywest_ctx->client)
Signature · 1 line
1.7.4.1