diff options
author | Mark Brown <broonie@kernel.org> | 2015-04-12 19:48:30 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-12 19:48:30 +0100 |
commit | d1113af4e8c0f2cd71e52cb904447bd0eec8aa54 (patch) | |
tree | 60de96c5b9716f6115ed68507c0deb361d063569 /sound/soc/soc-pcm.c | |
parent | 89a88dd3d6823f46bfb1405c4b358f89d5526cd6 (diff) | |
parent | a5053a8e200e865ab786384df3f985a3cbb346fe (diff) | |
download | linux-d1113af4e8c0f2cd71e52cb904447bd0eec8aa54.tar.bz2 |
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 6e3781e88f9a..35fe58f4fa86 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1097,8 +1097,9 @@ static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe, stream ? "<-" : "->", be->dai_link->name); #ifdef CONFIG_DEBUG_FS - dpcm->debugfs_state = debugfs_create_u32(be->dai_link->name, 0644, - fe->debugfs_dpcm_root, &dpcm->state); + if (fe->debugfs_dpcm_root) + dpcm->debugfs_state = debugfs_create_u32(be->dai_link->name, 0644, + fe->debugfs_dpcm_root, &dpcm->state); #endif return 1; } @@ -2803,10 +2804,13 @@ static const struct file_operations dpcm_state_fops = { .llseek = default_llseek, }; -int soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd) +void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd) { if (!rtd->dai_link) - return 0; + return; + + if (!rtd->card->debugfs_card_root) + return; rtd->debugfs_dpcm_root = debugfs_create_dir(rtd->dai_link->name, rtd->card->debugfs_card_root); @@ -2814,13 +2818,11 @@ int soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd) dev_dbg(rtd->dev, "ASoC: Failed to create dpcm debugfs directory %s\n", rtd->dai_link->name); - return -EINVAL; + return; } rtd->debugfs_dpcm_state = debugfs_create_file("state", 0444, rtd->debugfs_dpcm_root, rtd, &dpcm_state_fops); - - return 0; } #endif |