snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
        runtime->dma_bytes = params_buffer_bytes(params);
 
-       prtd->params = rtd->cpu_dai->dma_data;
+       prtd->params = rtd->dai->cpu_dai->dma_data;
        prtd->params->dma_intr_handler = at91_pcm_dma_irq;
 
        prtd->dma_buffer = runtime->dma_addr;
        }
 }
 
+#ifdef CONFIG_PM
 static int at91_pcm_suspend(struct platform_device *pdev,
        struct snd_soc_cpu_dai *dai)
 {
        at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable);
        return 0;
 }
+#else
+#define at91_pcm_suspend       NULL
+#define at91_pcm_resume                NULL
+#endif
 
 struct snd_soc_platform at91_soc_platform = {
        .name           = "at91-audio",
 
  * published by the Free Software Foundation.
  */
 
+#ifndef _AT91_PCM_H
+#define _AT91_PCM_H
+
 #include <asm/arch/hardware.h>
 
 struct at91_ssc_periph {
        u32             pid;
 };
 
-
 /*
  * Registers and status bits that are required by the PCM driver.
  */
        u32     pdc_disable;            /* PDC recv/trans disable */
 };
 
-
 /*
  * This structure, shared between the PCM driver and the interface,
  * contains all information required by the PCM driver to perform the
        void (*dma_intr_handler)(u32, struct snd_pcm_substream *);
 };
 
-extern struct snd_soc_cpu_dai at91_i2s_dai[3];
 extern struct snd_soc_platform at91_soc_platform;
 
-
 #define at91_ssc_read(a)       ((unsigned long) __raw_readl(a))
 #define at91_ssc_write(a,v)    __raw_writel((v),(a))
+
+#endif /* _AT91_PCM_H */