ASoC: soc-pcm.c: use dai_link on soc_get_playback_capture()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 30 May 2023 00:49:50 +0000 (00:49 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 31 May 2023 11:25:03 +0000 (12:25 +0100)
commitcfcb31c456b15e298f88fb5ebedf7b32b009d32d
tree5125b0209719f2bafc01666ae611630bb6a1ff9b
parent092830cf550667d5fa6286605167d232f2c1f61e
ASoC: soc-pcm.c: use dai_link on soc_get_playback_capture()

soc_get_playback_capture() (A) is using rtd->dai_link->xxx everywhere.
Because of that, 1 line is unnecessarily long and not readable.

(A) static int soc_get_playback_capture(...)
{
if (rtd->dai_link->dynamic ...) {
    ^^^^^^^^^^^^^
...
} else {
int cpu_capture = rtd->dai_link->c2c_params ?
  ^^^^^^^^^^^^^
...
}

if (rtd->dai_link->playback_only) {
    ^^^^^^^^^^^^^
...
}
...
}

This patch uses variable "dai_link" to be clear code.
Nothing changes the meanings.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87wn0qzlqp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c