]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/soc/codecs/wm8731.c
Merge branch 'for-2.6.37' into for-2.6.38
[mv-sheeva.git] / sound / soc / codecs / wm8731.c
index e725c09a3e79bf7bafa6fda17ee6112fd629e6ee..94e0cf3a66a15b6df01095de741165034269b52b 100644 (file)
@@ -26,7 +26,6 @@
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
-#include <sound/soc-dapm.h>
 #include <sound/initval.h>
 #include <sound/tlv.h>
 
@@ -165,10 +164,11 @@ static const struct snd_soc_dapm_route intercon[] = {
 
 static int wm8731_add_widgets(struct snd_soc_codec *codec)
 {
-       snd_soc_dapm_new_controls(codec, wm8731_dapm_widgets,
-                                 ARRAY_SIZE(wm8731_dapm_widgets));
+       struct snd_soc_dapm_context *dapm = &codec->dapm;
 
-       snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
+       snd_soc_dapm_new_controls(dapm, wm8731_dapm_widgets,
+                                 ARRAY_SIZE(wm8731_dapm_widgets));
+       snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
 
        return 0;
 }
@@ -319,7 +319,7 @@ static int wm8731_set_dai_sysclk(struct snd_soc_dai *codec_dai,
                return -EINVAL;
        }
 
-       snd_soc_dapm_sync(codec);
+       snd_soc_dapm_sync(&codec->dapm);
 
        return 0;
 }
@@ -399,7 +399,7 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec,
        case SND_SOC_BIAS_PREPARE:
                break;
        case SND_SOC_BIAS_STANDBY:
-               if (codec->bias_level == SND_SOC_BIAS_OFF) {
+               if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
                        ret = regulator_bulk_enable(ARRAY_SIZE(wm8731->supplies),
                                                    wm8731->supplies);
                        if (ret != 0)
@@ -428,7 +428,7 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec,
                                       wm8731->supplies);
                break;
        }
-       codec->bias_level = level;
+       codec->dapm.bias_level = level;
        return 0;
 }
 
@@ -542,7 +542,6 @@ err_regulator_enable:
 err_regulator_get:
        regulator_bulk_free(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);
 
-       kfree(wm8731);
        return ret;
 }