mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
daf5e3c681
Refactor the code responsible for selecting the correct device node for audio endpoint parsing in the rsnd driver. A new helper function `rsnd_pick_endpoint_node_for_ports()` is introduced to handle the selection of the endpoint node by checking whether the port is named 'port' or 'ports'. This change simplifies the logic in both `rsnd_dai_of_node()` and `rsnd_dai_probe()` functions by replacing repetitive condition checks with the new helper. Suggested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20241011175346.1093649-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>