From: Fabio Estevam Date: Mon, 10 Jun 2013 13:24:41 +0000 (-0300) Subject: ASoC: sgtl5000: Use i2c_get_clientdata() X-Git-Tag: upstream/snapshot3+hdmi~4491^2~16^2~1^2~13^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c647af43f1517b5b2604b8a69ea72a17073e15f;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ASoC: sgtl5000: Use i2c_get_clientdata() We should use i2c_get_clientdata() to get the codec private structure. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 2e0227b..d441559 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1571,11 +1571,7 @@ disable_clk: static int sgtl5000_i2c_remove(struct i2c_client *client) { - struct sgtl5000_priv *sgtl5000; - sgtl5000 = devm_kzalloc(&client->dev, sizeof(struct sgtl5000_priv), - GFP_KERNEL); - if (!sgtl5000) - return -ENOMEM; + struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client); snd_soc_unregister_codec(&client->dev); clk_disable_unprepare(sgtl5000->mclk);