Skip to content

Commit a84d840

Browse files
krzkbroonie
authored andcommitted
ASoC: amd: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent a80f2f8 commit a84d840

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

sound/soc/amd/acp/acp-mach-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static void acp_card_shutdown(struct snd_pcm_substream *substream)
217217
static int acp_card_rt5682_hw_params(struct snd_pcm_substream *substream,
218218
struct snd_pcm_hw_params *params)
219219
{
220-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
220+
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
221221
struct snd_soc_card *card = rtd->card;
222222
struct acp_card_drvdata *drvdata = card->drvdata;
223223
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);

sound/soc/amd/acp3x-rt5682-max9836.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static int rt5682_clk_enable(struct snd_pcm_substream *substream)
143143
static int acp3x_1015_hw_params(struct snd_pcm_substream *substream,
144144
struct snd_pcm_hw_params *params)
145145
{
146-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
146+
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
147147
struct snd_soc_dai *codec_dai;
148148
int srate, i, ret;
149149

sound/soc/amd/ps/ps-sdw-dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static int acp63_sdw_dma_open(struct snd_soc_component *component,
218218
struct acp_sdw_dma_stream *stream;
219219
struct snd_soc_dai *cpu_dai;
220220
struct amd_sdw_manager *amd_manager;
221-
struct snd_soc_pcm_runtime *prtd = substream->private_data;
221+
struct snd_soc_pcm_runtime *prtd = snd_soc_substream_to_rtd(substream);
222222
int ret;
223223

224224
runtime = substream->runtime;

0 commit comments

Comments
 (0)