Merge branch 'stable/for-linus-fixes-3.3' of git://git.kernel.org/pub/scm/linux/kerne...
[deliverable/linux.git] / sound / soc / samsung / idma.c
index baf97ebadd48a3bde8156b70b3674832090e4cff..c227c3163caeacba809ce7fc0b0b0276062a5008 100644 (file)
@@ -387,7 +387,6 @@ static u64 idma_mask = DMA_BIT_MASK(32);
 static int idma_new(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_card *card = rtd->card->snd_card;
-       struct snd_soc_dai *dai = rtd->cpu_dai;
        struct snd_pcm *pcm = rtd->pcm;
        int ret = 0;
 
@@ -396,9 +395,10 @@ static int idma_new(struct snd_soc_pcm_runtime *rtd)
        if (!card->dev->coherent_dma_mask)
                card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
 
-       if (dai->driver->playback.channels_min)
+       if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
                ret = preallocate_idma_buffer(pcm,
                                SNDRV_PCM_STREAM_PLAYBACK);
+       }
 
        return ret;
 }
@@ -410,7 +410,7 @@ void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr)
        idma.lp_tx_addr = addr;
 }
 
-struct snd_soc_platform_driver asoc_idma_platform = {
+static struct snd_soc_platform_driver asoc_idma_platform = {
        .ops = &idma_ops,
        .pcm_new = idma_new,
        .pcm_free = idma_free,
This page took 0.027706 seconds and 5 git commands to generate.