All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [alsa-devel] [PATCH 1/6] ASoC: soundwaire: qcom: use for_each_rtd_codec_dai() macro
Date: 13 Feb 2020 13:08:35 +0900	[thread overview]
Message-ID: <87k14rrux0.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87lfp7ruxl.wl-kuninori.morimoto.gx@renesas.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/soundwire/qcom.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 1c6c6a2e0def..fb30bbec999a 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -594,6 +594,7 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
 	struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dai->dev);
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct sdw_stream_runtime *sruntime;
+	struct snd_soc_dai *codec_dai;
 	int ret, i;
 
 	sruntime = sdw_alloc_stream(dai->name);
@@ -602,12 +603,12 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
 
 	ctrl->sruntime[dai->id] = sruntime;
 
-	for (i = 0; i < rtd->num_codecs; i++) {
-		ret = snd_soc_dai_set_sdw_stream(rtd->codec_dais[i], sruntime,
+	for_each_rtd_codec_dai(rtd, i, codec_dai) {
+		ret = snd_soc_dai_set_sdw_stream(codec_dai, sruntime,
 						 substream->stream);
 		if (ret < 0 && ret != -ENOTSUPP) {
 			dev_err(dai->dev, "Failed to set sdw stream on %s",
-				rtd->codec_dais[i]->name);
+				codec_dai->name);
 			sdw_release_stream(sruntime);
 			return ret;
 		}
-- 
2.17.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2020-02-13  4:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  4:08 [alsa-devel] [PATCH 0/6] ASoC: use for_each_rtd_codec_dai() macro Kuninori Morimoto
2020-02-13  4:08 ` Kuninori Morimoto [this message]
2020-02-13  4:08 ` [alsa-devel] [PATCH 2/6] ASoC: qcom: sdm845: " Kuninori Morimoto
2020-02-13  4:08 ` [alsa-devel] [PATCH 3/6] ASoC: qcom: apq8016_sbc: " Kuninori Morimoto
2020-02-13  4:08 ` [alsa-devel] [PATCH 4/6] ASoC: intel: cml_rt1011_rt5682: " Kuninori Morimoto
2020-02-13  4:08 ` [alsa-devel] [PATCH 5/6] ASoC: intel: kbl_da7219_max98927: " Kuninori Morimoto
2020-02-13  4:08 ` [alsa-devel] [PATCH 6/6] ASoC: mediatek: mt8183-da7219-max98357: " Kuninori Morimoto
2020-02-13 15:29 ` [alsa-devel] [PATCH 0/6] ASoC: " Pierre-Louis Bossart

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=87k14rrux0.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.