]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/soc/codecs/cx20442.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / sound / soc / codecs / cx20442.c
index e8d27c8f9ba392e16a8f05ae38da6cd7a274fab2..0bb424af956fb0377632d53a9bd6e2bcaadcccd9 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <sound/core.h>
 #include <sound/initval.h>
-#include <sound/soc-dapm.h>
+#include <sound/soc.h>
 
 #include "cx20442.h"
 
@@ -26,7 +26,6 @@
 struct cx20442_priv {
        enum snd_soc_control_type control_type;
        void *control_data;
-       u8 reg_cache[1];
 };
 
 #define CX20442_PM             0x0
@@ -89,10 +88,11 @@ static const struct snd_soc_dapm_route cx20442_audio_map[] = {
 
 static int cx20442_add_widgets(struct snd_soc_codec *codec)
 {
-       snd_soc_dapm_new_controls(codec, cx20442_dapm_widgets,
-                                 ARRAY_SIZE(cx20442_dapm_widgets));
+       struct snd_soc_dapm_context *dapm = &codec->dapm;
 
-       snd_soc_dapm_add_routes(codec, cx20442_audio_map,
+       snd_soc_dapm_new_controls(dapm, cx20442_dapm_widgets,
+                                 ARRAY_SIZE(cx20442_dapm_widgets));
+       snd_soc_dapm_add_routes(dapm, cx20442_audio_map,
                                ARRAY_SIZE(cx20442_audio_map));
 
        return 0;
@@ -263,7 +263,7 @@ static void v253_close(struct tty_struct *tty)
        /* Prevent the codec driver from further accessing the modem */
        codec->hw_write = NULL;
        cx20442->control_data = NULL;
-       codec->pop_time = 0;
+       codec->card->pop_time = 0;
 }
 
 /* Line discipline .hangup() */
@@ -291,7 +291,7 @@ static void v253_receive(struct tty_struct *tty,
                /* Set up codec driver access to modem controls */
                cx20442->control_data = tty;
                codec->hw_write = (hw_write_t)tty->ops->write;
-               codec->pop_time = 1;
+               codec->card->pop_time = 1;
        }
 }
 
@@ -348,7 +348,7 @@ static int cx20442_codec_probe(struct snd_soc_codec *codec)
 
        cx20442->control_data = NULL;
        codec->hw_write = NULL;
-       codec->pop_time = 0;
+       codec->card->pop_time = 0;
 
        return 0;
 }
@@ -367,9 +367,12 @@ static int cx20442_codec_remove(struct snd_soc_codec *codec)
        return 0;
 }
 
+static const u8 cx20442_reg;
+
 static struct snd_soc_codec_driver cx20442_codec_dev = {
        .probe =        cx20442_codec_probe,
        .remove =       cx20442_codec_remove,
+       .reg_cache_default = &cx20442_reg,
        .reg_cache_size = 1,
        .reg_word_size = sizeof(u8),
        .read = cx20442_read_reg_cache,