summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/sgtl5000.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-06-10 10:24:41 -0300
committerMark Brown <broonie@linaro.org>2013-06-12 16:06:36 +0100
commit7c647af43f1517b5b2604b8a69ea72a17073e15f (patch)
tree450aec6717153528ef3d2599a3105230e803d27e /sound/soc/codecs/sgtl5000.c
parent9e13f345887c179068bbc1f7389b7177bf88f57e (diff)
downloadop-kernel-dev-7c647af43f1517b5b2604b8a69ea72a17073e15f.zip
op-kernel-dev-7c647af43f1517b5b2604b8a69ea72a17073e15f.tar.gz
ASoC: sgtl5000: Use i2c_get_clientdata()
We should use i2c_get_clientdata() to get the codec private structure. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/sgtl5000.c')
-rw-r--r--sound/soc/codecs/sgtl5000.c6
1 files changed, 1 insertions, 5 deletions
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);
OpenPOWER on IntegriCloud