* [PATCH] ASoC: Convert CS42L73 to devm_kzalloc()
@ 2011-11-28 21:49 Brian Austin
2011-11-28 22:12 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Brian Austin @ 2011-11-28 21:49 UTC (permalink / raw)
To: alsa-devel; +Cc: Brian Austin, broonie, lrg, joe
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
---
sound/soc/codecs/cs42l73.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index d09578f..9fd5de7 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1339,7 +1339,8 @@ static __devinit int cs42l73_i2c_probe(struct i2c_client *i2c_client,
unsigned int devid = 0;
unsigned int reg;
- cs42l73 = kzalloc((sizeof *cs42l73), GFP_KERNEL);
+ cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private),
+ GFP_KERNEL);
if (!cs42l73) {
dev_err(&i2c_client->dev, "could not allocate codec\n");
return -ENOMEM;
@@ -1394,8 +1395,6 @@ err_regmap:
regmap_exit(cs42l73->regmap);
err:
- kfree(cs42l73);
-
return ret;
}
@@ -1406,7 +1405,6 @@ static __devexit int cs42l73_i2c_remove(struct i2c_client *client)
snd_soc_unregister_codec(&client->dev);
regmap_exit(cs42l73->regmap);
- kfree(cs42l73);
return 0;
}
--
1.7.7.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: Convert CS42L73 to devm_kzalloc()
2011-11-28 21:49 [PATCH] ASoC: Convert CS42L73 to devm_kzalloc() Brian Austin
@ 2011-11-28 22:12 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2011-11-28 22:12 UTC (permalink / raw)
To: Brian Austin; +Cc: alsa-devel, lrg, joe
On Mon, Nov 28, 2011 at 03:49:31PM -0600, Brian Austin wrote:
> Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-28 22:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28 21:49 [PATCH] ASoC: Convert CS42L73 to devm_kzalloc() Brian Austin
2011-11-28 22:12 ` Mark Brown
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.