From: Xiubo Li <Li.Xiubo@freescale.com>
To: <broonie@kernel.org>, <perex@perex.cz>, <tiwai@suse.de>,
<kuninori.morimoto.gx@renesas.com>
Cc: <fabio.estevam@freescale.com>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH] ASoC: soc-core: Fix the DAI name getting.
Date: Fri, 20 Dec 2013 14:39:51 +0800 [thread overview]
Message-ID: <1387521591-15262-2-git-send-email-Li.Xiubo@freescale.com> (raw)
In-Reply-To: <1387521591-15262-1-git-send-email-Li.Xiubo@freescale.com>
>From "ASoC: make snd_soc_dai_link more symmetrical", can we see that
the name of CPU DAI maybe omitted. If the DAI name is omitted, try to
use the component name instead.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
sound/soc/soc-core.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a66783e..be88df5 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -4617,10 +4617,14 @@ int snd_soc_of_get_dai_name(struct device_node *of_node,
if (id < 0 || id >= pos->num_dai) {
ret = -EINVAL;
- } else {
- *dai_name = pos->dai_drv[id].name;
- ret = 0;
+ break;
}
+
+ ret = 0;
+
+ *dai_name = pos->dai_drv[id].name;
+ if (!*dai_name)
+ *dai_name = pos->name;
}
break;
--
1.8.4
next prev parent reply other threads:[~2013-12-20 7:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 6:39 [PATCH] ASoC: simple-card: Add cpu_dai and codec_dai names NULL check Xiubo Li
2013-12-20 6:39 ` Xiubo Li [this message]
2013-12-31 16:30 ` [PATCH] ASoC: soc-core: Fix the DAI name getting Mark Brown
2013-12-21 14:42 ` [PATCH] ASoC: simple-card: Add cpu_dai and codec_dai names NULL check Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387521591-15262-2-git-send-email-Li.Xiubo@freescale.com \
--to=li.xiubo@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=fabio.estevam@freescale.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®