From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Banajit Goswami <bgoswami@quicinc.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Peter Ujfalusi <peter.ujfalusi@gmail.com>,
Jarkko Nikula <jarkko.nikula@bitmer.com>,
Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Shengjiu Wang <shengjiu.wang@gmail.com>,
Xiubo Li <Xiubo.Lee@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
Nicolin Chen <nicoleotsuka@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Ban Tao <fengzheng923@gmail.com>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>
Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev,
linux-mediatek@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH 02/13] ASoC: tegra: Use snd_soc_substream_to_rtd() for accessing private_data
Date: Tue, 30 Apr 2024 16:02:11 +0200 [thread overview]
Message-ID: <20240430-asoc-snd-substream-clean-v1-2-6f8a8902b479@linaro.org> (raw)
In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org>
Do not open-code snd_soc_substream_to_rtd().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/tegra/tegra_asoc_machine.c | 2 +-
sound/soc/tegra/tegra_pcm.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c
index 192e9692bdf2..775ce433fdbf 100644
--- a/sound/soc/tegra/tegra_asoc_machine.c
+++ b/sound/soc/tegra/tegra_asoc_machine.c
@@ -290,7 +290,7 @@ static unsigned int tegra_machine_mclk_rate_6mhz(unsigned int srate)
static int tegra_machine_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
struct snd_soc_card *card = rtd->card;
struct tegra_machine *machine = snd_soc_card_get_drvdata(card);
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c
index 42acb56543db..4bdbcd2635ef 100644
--- a/sound/soc/tegra/tegra_pcm.c
+++ b/sound/soc/tegra/tegra_pcm.c
@@ -76,7 +76,7 @@ EXPORT_SYMBOL_GPL(tegra_pcm_platform_unregister);
int tegra_pcm_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_dmaengine_dai_dma_data *dmap;
struct dma_chan *chan;
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
@@ -127,7 +127,7 @@ EXPORT_SYMBOL_GPL(tegra_pcm_open);
int tegra_pcm_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
if (rtd->dai_link->no_pcm)
return 0;
@@ -142,7 +142,7 @@ int tegra_pcm_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_dmaengine_dai_dma_data *dmap;
struct dma_slave_config slave_config;
struct dma_chan *chan;
--
2.43.0
next prev parent reply other threads:[~2024-04-30 14:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 14:02 [PATCH 00/13] ASoC: Use snd_soc_substream_to_rtd() for accessing private_data Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 01/13] ASoC: qcom: " Krzysztof Kozlowski
2024-04-30 14:02 ` Krzysztof Kozlowski [this message]
2024-04-30 14:02 ` [PATCH 03/13] ASoC: ti: " Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 04/13] ASoC: arm: " Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 05/13] ASoC: amd: " Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 06/13] ASoC: fsl: " Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 07/13] ASoC: img: " Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 08/13] ASoC: kirkwood: " Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 09/13] ASoC: loongson: " Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 10/13] ASoC: mediatek: " Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 11/13] ASoC: meson: " Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 12/13] ASoC: samsung: " Krzysztof Kozlowski
2024-04-30 14:02 ` [PATCH 13/13] ASoC: sunxi: " Krzysztof Kozlowski
2024-04-30 19:53 ` Jernej Škrabec
2024-05-07 14:34 ` [PATCH 00/13] ASoC: " 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=20240430-asoc-snd-substream-clean-v1-2-6f8a8902b479@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=daniel@zonque.org \
--cc=fengzheng923@gmail.com \
--cc=festevam@gmail.com \
--cc=haojian.zhuang@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jarkko.nikula@bitmer.com \
--cc=jbrunet@baylibre.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=neil.armstrong@linaro.org \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@gmail.com \
--cc=robert.jarzmik@free.fr \
--cc=s.hauer@pengutronix.de \
--cc=s.nawrocki@samsung.com \
--cc=samuel@sholland.org \
--cc=shawnguo@kernel.org \
--cc=shengjiu.wang@gmail.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=thierry.reding@gmail.com \
--cc=tiwai@suse.com \
--cc=wens@csie.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).