aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/pcm3008.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/pcm3008.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/pcm3008.c')
-rw-r--r--sound/soc/codecs/pcm3008.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/codecs/pcm3008.c b/sound/soc/codecs/pcm3008.c
index 9a3e67e5319c..5cda9e6b5a74 100644
--- a/sound/soc/codecs/pcm3008.c
+++ b/sound/soc/codecs/pcm3008.c
@@ -67,11 +67,11 @@ static int pcm3008_soc_probe(struct platform_device *pdev)
67 67
68 printk(KERN_INFO "PCM3008 SoC Audio Codec %s\n", PCM3008_VERSION); 68 printk(KERN_INFO "PCM3008 SoC Audio Codec %s\n", PCM3008_VERSION);
69 69
70 socdev->codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); 70 socdev->card->codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
71 if (!socdev->codec) 71 if (!socdev->card->codec)
72 return -ENOMEM; 72 return -ENOMEM;
73 73
74 codec = socdev->codec; 74 codec = socdev->card->codec;
75 mutex_init(&codec->mutex); 75 mutex_init(&codec->mutex);
76 76
77 codec->name = "PCM3008"; 77 codec->name = "PCM3008";
@@ -139,7 +139,7 @@ gpio_err:
139card_err: 139card_err:
140 snd_soc_free_pcms(socdev); 140 snd_soc_free_pcms(socdev);
141pcm_err: 141pcm_err:
142 kfree(socdev->codec); 142 kfree(socdev->card->codec);
143 143
144 return ret; 144 return ret;
145} 145}
@@ -147,7 +147,7 @@ pcm_err:
147static int pcm3008_soc_remove(struct platform_device *pdev) 147static int pcm3008_soc_remove(struct platform_device *pdev)
148{ 148{
149 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 149 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
150 struct snd_soc_codec *codec = socdev->codec; 150 struct snd_soc_codec *codec = socdev->card->codec;
151 struct pcm3008_setup_data *setup = socdev->codec_data; 151 struct pcm3008_setup_data *setup = socdev->codec_data;
152 152
153 if (!codec) 153 if (!codec)
@@ -155,7 +155,7 @@ static int pcm3008_soc_remove(struct platform_device *pdev)
155 155
156 pcm3008_gpio_free(setup); 156 pcm3008_gpio_free(setup);
157 snd_soc_free_pcms(socdev); 157 snd_soc_free_pcms(socdev);
158 kfree(socdev->codec); 158 kfree(socdev->card->codec);
159 159
160 return 0; 160 return 0;
161} 161}