aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ad1980.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-23 17:55:23 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-27 05:30:54 -0500
commit6627a653bceb3a54e55e5cdc478ec5b8d5c9cc44 (patch)
tree9a6f157ad1123e4f047689bbf3c4ef88ec1259a4 /sound/soc/codecs/ad1980.c
parent0db4d0705260dd4bddf1e5a5441c58bdf08bdc9f (diff)
ASoC: Push the codec runtime storage into the card structure
This is a further stage on the road to refactoring away the ASoC platform device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/ad1980.c')
-rw-r--r--sound/soc/codecs/ad1980.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index faf358758e13..ddb3b08ac23c 100644
--- a/sound/soc/codecs/ad1980.c
+++ b/sound/soc/codecs/ad1980.c
@@ -186,10 +186,10 @@ static int ad1980_soc_probe(struct platform_device *pdev)
186 186
187 printk(KERN_INFO "AD1980 SoC Audio Codec\n"); 187 printk(KERN_INFO "AD1980 SoC Audio Codec\n");
188 188
189 socdev->codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); 189 socdev->card->codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
190 if (socdev->codec == NULL) 190 if (socdev->card->codec == NULL)
191 return -ENOMEM; 191 return -ENOMEM;
192 codec = socdev->codec; 192 codec = socdev->card->codec;
193 mutex_init(&codec->mutex); 193 mutex_init(&codec->mutex);
194 194
195 codec->reg_cache = 195 codec->reg_cache =
@@ -275,15 +275,15 @@ codec_err:
275 kfree(codec->reg_cache); 275 kfree(codec->reg_cache);
276 276
277cache_err: 277cache_err:
278 kfree(socdev->codec); 278 kfree(socdev->card->codec);
279 socdev->codec = NULL; 279 socdev->card->codec = NULL;
280 return ret; 280 return ret;
281} 281}
282 282
283static int ad1980_soc_remove(struct platform_device *pdev) 283static int ad1980_soc_remove(struct platform_device *pdev)
284{ 284{
285 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 285 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
286 struct snd_soc_codec *codec = socdev->codec; 286 struct snd_soc_codec *codec = socdev->card->codec;
287 287
288 if (codec == NULL) 288 if (codec == NULL)
289 return 0; 289 return 0;