From: Mark Brown Date: Tue, 8 May 2012 09:33:47 +0000 (+0100) Subject: ASoC: pcm: Fix DPCM for aux_devs X-Git-Tag: v3.5-rc1~13^2~9^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3bba9a1a8dfcd338eb7d099dcd53daacb698f8b;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git ASoC: pcm: Fix DPCM for aux_devs 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 Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index c0b394f..4f824cb 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -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) {