Unverified Commit daf5e3c6 authored by Lad Prabhakar's avatar Lad Prabhakar Committed by Mark Brown
Browse files

ASoC: rsnd: Refactor port handling with helper for endpoint node selection



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: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20241011175346.1093649-1-prabhakar.mahadev-lad.rj@bp.renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 43916d92
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment