ASoC: pcm: Fix DPCM for aux_devs
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 8 May 2012 09:33:47 +0000 (10:33 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 8 May 2012 11:29:15 +0000 (12:29 +0100)
When we instantiate an aux_dev we use a fake rtd as part of the process
which doesn't have a dai_link associated with it. Fix the dpcm startup
code to cope with this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
sound/soc/soc-pcm.c

index c0b394fdd6891c53c500b3eeedf2d9ef841337ad..4f824cbd66f4c8398bbeaae1510e38482a44c2b9 100644 (file)
@@ -2332,6 +2332,9 @@ static const struct file_operations dpcm_state_fops = {
 
 int soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd)
 {
+       if (!rtd->dai_link)
+               return 0;
+
        rtd->debugfs_dpcm_root = debugfs_create_dir(rtd->dai_link->name,
                        rtd->card->debugfs_card_root);
        if (!rtd->debugfs_dpcm_root) {