aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl4030.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r--sound/soc/codecs/twl4030.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index a6ceddb0bb7d..3820885c8c2a 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -2272,9 +2272,12 @@ static int twl4030_soc_probe(struct snd_soc_codec *codec)
2272 2272
2273static int twl4030_soc_remove(struct snd_soc_codec *codec) 2273static int twl4030_soc_remove(struct snd_soc_codec *codec)
2274{ 2274{
2275 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec);
2276
2275 /* Reset registers to their chip default before leaving */ 2277 /* Reset registers to their chip default before leaving */
2276 twl4030_reset_registers(codec); 2278 twl4030_reset_registers(codec);
2277 twl4030_set_bias_level(codec, SND_SOC_BIAS_OFF); 2279 twl4030_set_bias_level(codec, SND_SOC_BIAS_OFF);
2280 kfree(twl4030);
2278 return 0; 2281 return 0;
2279} 2282}
2280 2283
@@ -2306,10 +2309,7 @@ static int __devinit twl4030_codec_probe(struct platform_device *pdev)
2306 2309
2307static int __devexit twl4030_codec_remove(struct platform_device *pdev) 2310static int __devexit twl4030_codec_remove(struct platform_device *pdev)
2308{ 2311{
2309 struct twl4030_priv *twl4030 = dev_get_drvdata(&pdev->dev);
2310
2311 snd_soc_unregister_codec(&pdev->dev); 2312 snd_soc_unregister_codec(&pdev->dev);
2312 kfree(twl4030);
2313 return 0; 2313 return 0;
2314} 2314}
2315 2315