include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / sound / soc / codecs / wm8900.c
index 0d185cb..b7fd96a 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/pm.h>
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
+#include <linux/slab.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
@@ -199,7 +200,7 @@ static void wm8900_reset(struct snd_soc_codec *codec)
        snd_soc_write(codec, WM8900_REG_RESET, 0);
 
        memcpy(codec->reg_cache, wm8900_reg_defaults,
-              sizeof(codec->reg_cache));
+              sizeof(wm8900_reg_defaults));
 }
 
 static int wm8900_hp_event(struct snd_soc_dapm_widget *w,
@@ -618,8 +619,6 @@ static int wm8900_add_widgets(struct snd_soc_codec *codec)
 
        snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
 
-       snd_soc_dapm_new_widgets(codec);
-
        return 0;
 }
 
@@ -1353,11 +1352,6 @@ static int wm8900_probe(struct platform_device *pdev)
                                ARRAY_SIZE(wm8900_snd_controls));
        wm8900_add_widgets(codec);
 
-       return ret;
-
-card_err:
-       snd_soc_free_pcms(socdev);
-       snd_soc_dapm_free(socdev);
 pcm_err:
        return ret;
 }