ASoC: tegra: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-2-6f8a8902b479@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
77678a25d1
commit
3beb985abb
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user