]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - sound/soc/cirrus/ep93xx-ac97.c
Merge tag 'asoc-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-imx.git] / sound / soc / cirrus / ep93xx-ac97.c
index 4bc9490e2c8480a752250503a014f720a2766174..ac73c607410a73d92ff84a817c22bf6a99c25d5f 100644 (file)
@@ -313,22 +313,15 @@ static int ep93xx_ac97_trigger(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static int ep93xx_ac97_startup(struct snd_pcm_substream *substream,
-                              struct snd_soc_dai *dai)
+static int ep93xx_ac97_dai_probe(struct snd_soc_dai *dai)
 {
-       struct ep93xx_dma_data *dma_data;
+       dai->playback_dma_data = &ep93xx_ac97_pcm_out;
+       dai->capture_dma_data = &ep93xx_ac97_pcm_in;
 
-       if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-               dma_data = &ep93xx_ac97_pcm_out;
-       else
-               dma_data = &ep93xx_ac97_pcm_in;
-
-       snd_soc_dai_set_dma_data(dai, substream, dma_data);
        return 0;
 }
 
 static const struct snd_soc_dai_ops ep93xx_ac97_dai_ops = {
-       .startup        = ep93xx_ac97_startup,
        .trigger        = ep93xx_ac97_trigger,
 };
 
@@ -336,6 +329,7 @@ static struct snd_soc_dai_driver ep93xx_ac97_dai = {
        .name           = "ep93xx-ac97",
        .id             = 0,
        .ac97_control   = 1,
+       .probe          = ep93xx_ac97_dai_probe,
        .playback       = {
                .stream_name    = "AC97 Playback",
                .channels_min   = 2,
@@ -406,7 +400,6 @@ static int ep93xx_ac97_probe(struct platform_device *pdev)
        return 0;
 
 fail:
-       platform_set_drvdata(pdev, NULL);
        ep93xx_ac97_info = NULL;
        snd_soc_set_ac97_ops(NULL);
        return ret;
@@ -421,7 +414,6 @@ static int ep93xx_ac97_remove(struct platform_device *pdev)
        /* disable the AC97 controller */
        ep93xx_ac97_write_reg(info, AC97GCR, 0);
 
-       platform_set_drvdata(pdev, NULL);
        ep93xx_ac97_info = NULL;
 
        snd_soc_set_ac97_ops(NULL);