All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ASoC: Convert ak4104 to devm_kzalloc()
@ 2011-12-20  6:37 Axel Lin
  2011-12-20  6:38 ` [PATCH 2/5] ASoC: Convert ak4535 " Axel Lin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Axel Lin @ 2011-12-20  6:37 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood, Daniel Mack, Lars-Peter Clausen

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/ak4104.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c
index 152420c..d27b5e4 100644
--- a/sound/soc/codecs/ak4104.c
+++ b/sound/soc/codecs/ak4104.c
@@ -261,7 +261,8 @@ static int ak4104_spi_probe(struct spi_device *spi)
 	if (ret < 0)
 		return ret;
 
-	ak4104 = kzalloc(sizeof(struct ak4104_private), GFP_KERNEL);
+	ak4104 = devm_kzalloc(&spi->dev, sizeof(struct ak4104_private),
+			      GFP_KERNEL);
 	if (ak4104 == NULL)
 		return -ENOMEM;
 
@@ -271,15 +272,12 @@ static int ak4104_spi_probe(struct spi_device *spi)
 
 	ret = snd_soc_register_codec(&spi->dev,
 			&soc_codec_device_ak4104, &ak4104_dai, 1);
-	if (ret < 0)
-		kfree(ak4104);
 	return ret;
 }
 
 static int __devexit ak4104_spi_remove(struct spi_device *spi)
 {
 	snd_soc_unregister_codec(&spi->dev);
-	kfree(spi_get_drvdata(spi));
 	return 0;
 }
 
-- 
1.7.5.4

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

* [PATCH 2/5] ASoC: Convert ak4535 to devm_kzalloc()
  2011-12-20  6:37 [PATCH 1/5] ASoC: Convert ak4104 to devm_kzalloc() Axel Lin
@ 2011-12-20  6:38 ` Axel Lin
  2011-12-20  6:39 ` [PATCH 3/5] ASoC: Convert ak4641 " Axel Lin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Axel Lin @ 2011-12-20  6:38 UTC (permalink / raw)
  To: alsa-devel; +Cc: Brown, Richard Purdie, Liam Girdwood, Lars-Peter Clausen, Mark

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/ak4535.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index 96296fd..9e809e0 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -416,7 +416,8 @@ static __devinit int ak4535_i2c_probe(struct i2c_client *i2c,
 	struct ak4535_priv *ak4535;
 	int ret;
 
-	ak4535 = kzalloc(sizeof(struct ak4535_priv), GFP_KERNEL);
+	ak4535 = devm_kzalloc(&i2c->dev, sizeof(struct ak4535_priv),
+			      GFP_KERNEL);
 	if (ak4535 == NULL)
 		return -ENOMEM;
 
@@ -425,15 +426,12 @@ static __devinit int ak4535_i2c_probe(struct i2c_client *i2c,
 
 	ret = snd_soc_register_codec(&i2c->dev,
 			&soc_codec_dev_ak4535, &ak4535_dai, 1);
-	if (ret < 0)
-		kfree(ak4535);
 	return ret;
 }
 
 static __devexit int ak4535_i2c_remove(struct i2c_client *client)
 {
 	snd_soc_unregister_codec(&client->dev);
-	kfree(i2c_get_clientdata(client));
 	return 0;
 }
 
-- 
1.7.5.4

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

* [PATCH 3/5] ASoC: Convert ak4641 to devm_kzalloc()
  2011-12-20  6:37 [PATCH 1/5] ASoC: Convert ak4104 to devm_kzalloc() Axel Lin
  2011-12-20  6:38 ` [PATCH 2/5] ASoC: Convert ak4535 " Axel Lin
@ 2011-12-20  6:39 ` Axel Lin
  2011-12-20  6:40 ` [PATCH 4/5] ASoC: Convert ak4642 " Axel Lin
  2011-12-20  6:41 ` [PATCH 5/5] ASoC: Convert ak4671 " Axel Lin
  3 siblings, 0 replies; 5+ messages in thread
From: Axel Lin @ 2011-12-20  6:39 UTC (permalink / raw)
  To: alsa-devel
  Cc: Mark, Brown, Liam Girdwood, Lars-Peter Clausen, Dmitry Artamonow

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/ak4641.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c
index 9018470..266ebea 100644
--- a/sound/soc/codecs/ak4641.c
+++ b/sound/soc/codecs/ak4641.c
@@ -602,7 +602,8 @@ static int __devinit ak4641_i2c_probe(struct i2c_client *i2c,
 	struct ak4641_priv *ak4641;
 	int ret;
 
-	ak4641 = kzalloc(sizeof(struct ak4641_priv), GFP_KERNEL);
+	ak4641 = devm_kzalloc(&i2c->dev, sizeof(struct ak4641_priv),
+			      GFP_KERNEL);
 	if (!ak4641)
 		return -ENOMEM;
 
@@ -610,16 +611,12 @@ static int __devinit ak4641_i2c_probe(struct i2c_client *i2c,
 
 	ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_ak4641,
 				ak4641_dai, ARRAY_SIZE(ak4641_dai));
-	if (ret < 0)
-		kfree(ak4641);
-
 	return ret;
 }
 
 static int __devexit ak4641_i2c_remove(struct i2c_client *i2c)
 {
 	snd_soc_unregister_codec(&i2c->dev);
-	kfree(i2c_get_clientdata(i2c));
 	return 0;
 }
 
-- 
1.7.5.4

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

* [PATCH 4/5] ASoC: Convert ak4642 to devm_kzalloc()
  2011-12-20  6:37 [PATCH 1/5] ASoC: Convert ak4104 to devm_kzalloc() Axel Lin
  2011-12-20  6:38 ` [PATCH 2/5] ASoC: Convert ak4535 " Axel Lin
  2011-12-20  6:39 ` [PATCH 3/5] ASoC: Convert ak4641 " Axel Lin
@ 2011-12-20  6:40 ` Axel Lin
  2011-12-20  6:41 ` [PATCH 5/5] ASoC: Convert ak4671 " Axel Lin
  3 siblings, 0 replies; 5+ messages in thread
From: Axel Lin @ 2011-12-20  6:40 UTC (permalink / raw)
  To: alsa-devel
  Cc: Kuninori Morimoto, Mark Brown, Liam Girdwood, Clausen, Lars-Peter

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/ak4642.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 9b4ee6c..5ef70b5 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -525,7 +525,8 @@ static __devinit int ak4642_i2c_probe(struct i2c_client *i2c,
 	struct ak4642_priv *ak4642;
 	int ret;
 
-	ak4642 = kzalloc(sizeof(struct ak4642_priv), GFP_KERNEL);
+	ak4642 = devm_kzalloc(&i2c->dev, sizeof(struct ak4642_priv),
+			      GFP_KERNEL);
 	if (!ak4642)
 		return -ENOMEM;
 
@@ -535,15 +536,12 @@ static __devinit int ak4642_i2c_probe(struct i2c_client *i2c,
 	ret =  snd_soc_register_codec(&i2c->dev,
 				(struct snd_soc_codec_driver *)id->driver_data,
 				&ak4642_dai, 1);
-	if (ret < 0)
-		kfree(ak4642);
 	return ret;
 }
 
 static __devexit int ak4642_i2c_remove(struct i2c_client *client)
 {
 	snd_soc_unregister_codec(&client->dev);
-	kfree(i2c_get_clientdata(client));
 	return 0;
 }
 
-- 
1.7.5.4

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

* [PATCH 5/5] ASoC: Convert ak4671 to devm_kzalloc()
  2011-12-20  6:37 [PATCH 1/5] ASoC: Convert ak4104 to devm_kzalloc() Axel Lin
                   ` (2 preceding siblings ...)
  2011-12-20  6:40 ` [PATCH 4/5] ASoC: Convert ak4642 " Axel Lin
@ 2011-12-20  6:41 ` Axel Lin
  3 siblings, 0 replies; 5+ messages in thread
From: Axel Lin @ 2011-12-20  6:41 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Joonyoung Shim, Lars-Peter Clausen, Liam Girdwood

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/ak4671.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c
index 4f5c69f..a53b152 100644
--- a/sound/soc/codecs/ak4671.c
+++ b/sound/soc/codecs/ak4671.c
@@ -661,7 +661,8 @@ static int __devinit ak4671_i2c_probe(struct i2c_client *client,
 	struct ak4671_priv *ak4671;
 	int ret;
 
-	ak4671 = kzalloc(sizeof(struct ak4671_priv), GFP_KERNEL);
+	ak4671 = devm_kzalloc(&client->dev, sizeof(struct ak4671_priv),
+			      GFP_KERNEL);
 	if (ak4671 == NULL)
 		return -ENOMEM;
 
@@ -670,15 +671,12 @@ static int __devinit ak4671_i2c_probe(struct i2c_client *client,
 
 	ret = snd_soc_register_codec(&client->dev,
 			&soc_codec_dev_ak4671, &ak4671_dai, 1);
-	if (ret < 0)
-		kfree(ak4671);
 	return ret;
 }
 
 static __devexit int ak4671_i2c_remove(struct i2c_client *client)
 {
 	snd_soc_unregister_codec(&client->dev);
-	kfree(i2c_get_clientdata(client));
 	return 0;
 }
 
-- 
1.7.5.4

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

end of thread, other threads:[~2011-12-20  6:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20  6:37 [PATCH 1/5] ASoC: Convert ak4104 to devm_kzalloc() Axel Lin
2011-12-20  6:38 ` [PATCH 2/5] ASoC: Convert ak4535 " Axel Lin
2011-12-20  6:39 ` [PATCH 3/5] ASoC: Convert ak4641 " Axel Lin
2011-12-20  6:40 ` [PATCH 4/5] ASoC: Convert ak4642 " Axel Lin
2011-12-20  6:41 ` [PATCH 5/5] ASoC: Convert ak4671 " Axel Lin

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.