diff options
Diffstat (limited to 'sound/soc/codecs/ad1836.c')
-rw-r--r-- | sound/soc/codecs/ad1836.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index d272534c8f84..ab63d52e36e1 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <sound/initval.h> | 27 | #include <sound/initval.h> |
28 | #include <sound/soc.h> | 28 | #include <sound/soc.h> |
29 | #include <sound/tlv.h> | 29 | #include <sound/tlv.h> |
30 | #include <sound/soc-dapm.h> | ||
31 | #include <linux/spi/spi.h> | 30 | #include <linux/spi/spi.h> |
32 | #include "ad1836.h" | 31 | #include "ad1836.h" |
33 | 32 | ||
@@ -220,6 +219,7 @@ static struct snd_soc_dai_driver ad1836_dai = { | |||
220 | static int ad1836_probe(struct snd_soc_codec *codec) | 219 | static int ad1836_probe(struct snd_soc_codec *codec) |
221 | { | 220 | { |
222 | struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec); | 221 | struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec); |
222 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
223 | int ret = 0; | 223 | int ret = 0; |
224 | 224 | ||
225 | codec->control_data = ad1836->control_data; | 225 | codec->control_data = ad1836->control_data; |
@@ -227,7 +227,6 @@ static int ad1836_probe(struct snd_soc_codec *codec) | |||
227 | if (ret < 0) { | 227 | if (ret < 0) { |
228 | dev_err(codec->dev, "failed to set cache I/O: %d\n", | 228 | dev_err(codec->dev, "failed to set cache I/O: %d\n", |
229 | ret); | 229 | ret); |
230 | kfree(ad1836); | ||
231 | return ret; | 230 | return ret; |
232 | } | 231 | } |
233 | 232 | ||
@@ -252,9 +251,9 @@ static int ad1836_probe(struct snd_soc_codec *codec) | |||
252 | 251 | ||
253 | snd_soc_add_controls(codec, ad1836_snd_controls, | 252 | snd_soc_add_controls(codec, ad1836_snd_controls, |
254 | ARRAY_SIZE(ad1836_snd_controls)); | 253 | ARRAY_SIZE(ad1836_snd_controls)); |
255 | snd_soc_dapm_new_controls(codec, ad1836_dapm_widgets, | 254 | snd_soc_dapm_new_controls(dapm, ad1836_dapm_widgets, |
256 | ARRAY_SIZE(ad1836_dapm_widgets)); | 255 | ARRAY_SIZE(ad1836_dapm_widgets)); |
257 | snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths)); | 256 | snd_soc_dapm_add_routes(dapm, audio_paths, ARRAY_SIZE(audio_paths)); |
258 | 257 | ||
259 | return ret; | 258 | return ret; |
260 | } | 259 | } |