linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ALSA: aoa: Remove obsolete cleanup for clientdata
@ 2011-09-09  9:49 Axel Lin
  2011-09-09  9:50 ` [PATCH 2/2] ALSA: keywest: " Axel Lin
  2011-09-09 10:05 ` [PATCH 1/2] ALSA: aoa: " Wolfram Sang
  0 siblings, 2 replies; 5+ messages in thread
From: Axel Lin @ 2011-09-09  9:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Johannes Berg, Wolfram Sang, Jaroslav Kysela, Takashi Iwai,
	alsa-devel

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.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/aoa/codecs/onyx.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
index 3687a6c..571f668 100644
--- a/sound/aoa/codecs/onyx.c
+++ b/sound/aoa/codecs/onyx.c
@@ -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;
 }
-- 
1.7.4.1




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

* [PATCH 2/2] ALSA: keywest: Remove obsolete cleanup for clientdata
  2011-09-09  9:49 [PATCH 1/2] ALSA: aoa: Remove obsolete cleanup for clientdata Axel Lin
@ 2011-09-09  9:50 ` Axel Lin
  2011-09-09 10:08   ` Wolfram Sang
  2011-09-12 11:58   ` Takashi Iwai
  2011-09-09 10:05 ` [PATCH 1/2] ALSA: aoa: " Wolfram Sang
  1 sibling, 2 replies; 5+ messages in thread
From: Axel Lin @ 2011-09-09  9:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Jaroslav Kysela, Takashi Iwai, alsa-devel

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.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/ppc/keywest.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c
index 8f064c7..4080bec 100644
--- a/sound/ppc/keywest.c
+++ b/sound/ppc/keywest.c
@@ -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)
-- 
1.7.4.1




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

* Re: [PATCH 1/2] ALSA: aoa: Remove obsolete cleanup for clientdata
  2011-09-09  9:49 [PATCH 1/2] ALSA: aoa: Remove obsolete cleanup for clientdata Axel Lin
  2011-09-09  9:50 ` [PATCH 2/2] ALSA: keywest: " Axel Lin
@ 2011-09-09 10:05 ` Wolfram Sang
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2011-09-09 10:05 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Johannes Berg, Jaroslav Kysela, Takashi Iwai,
	alsa-devel

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

On Fri, Sep 09, 2011 at 05:49:44PM +0800, Axel Lin wrote:
> 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.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

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

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

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

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

* Re: [PATCH 2/2] ALSA: keywest: Remove obsolete cleanup for clientdata
  2011-09-09  9:50 ` [PATCH 2/2] ALSA: keywest: " Axel Lin
@ 2011-09-09 10:08   ` Wolfram Sang
  2011-09-12 11:58   ` Takashi Iwai
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2011-09-09 10:08 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai, alsa-devel

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

On Fri, Sep 09, 2011 at 05:50:52PM +0800, Axel Lin wrote:
> 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.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

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

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 :)

> ---
>  sound/ppc/keywest.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c
> index 8f064c7..4080bec 100644
> --- a/sound/ppc/keywest.c
> +++ b/sound/ppc/keywest.c
> @@ -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)
> -- 
> 1.7.4.1
> 
> 
> 

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

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

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

* Re: [PATCH 2/2] ALSA: keywest: Remove obsolete cleanup for clientdata
  2011-09-09  9:50 ` [PATCH 2/2] ALSA: keywest: " Axel Lin
  2011-09-09 10:08   ` Wolfram Sang
@ 2011-09-12 11:58   ` Takashi Iwai
  1 sibling, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2011-09-12 11:58 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Wolfram Sang, Jaroslav Kysela, alsa-devel

At Fri, 09 Sep 2011 17:50:52 +0800,
Axel Lin wrote:
> 
> 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.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Applied now.  Thanks.


Takashi

> ---
>  sound/ppc/keywest.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c
> index 8f064c7..4080bec 100644
> --- a/sound/ppc/keywest.c
> +++ b/sound/ppc/keywest.c
> @@ -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)
> -- 
> 1.7.4.1
> 
> 
> 

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

end of thread, other threads:[~2011-09-12 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-09  9:49 [PATCH 1/2] ALSA: aoa: Remove obsolete cleanup for clientdata Axel Lin
2011-09-09  9:50 ` [PATCH 2/2] ALSA: keywest: " Axel Lin
2011-09-09 10:08   ` Wolfram Sang
2011-09-12 11:58   ` Takashi Iwai
2011-09-09 10:05 ` [PATCH 1/2] ALSA: aoa: " 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).