[PATCH RFC 1/2] ASoC: meson: meson-card-utils: use meson_card_parse_of_optional()
Jerome Brunet
jbrunet at baylibre.com
Tue Jul 21 00:32:30 PDT 2026
On mar. 21 juil. 2026 at 01:36, Kuninori Morimoto <kuninori.morimoto.gx at renesas.com> wrote:
> We already have meson_card_parse_of_optional(). Let's use it for
> snd_soc_of_parse_aux_devs() too.
>
> It is using snd_soc_of_parse_card_name(), but let's keep as-is
> for it for now. Beuase it will be not able to share code when
> Card capsuling.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> ---
> sound/soc/meson/meson-card-utils.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c
> index 8617a4661a339..d144ab79b645b 100644
> --- a/sound/soc/meson/meson-card-utils.c
> +++ b/sound/soc/meson/meson-card-utils.c
> @@ -300,7 +300,8 @@ int meson_card_probe(struct platform_device *pdev)
> if (ret)
> goto out_err;
>
> - ret = snd_soc_of_parse_aux_devs(&priv->card, "audio-aux-devs");
> + ret = meson_card_parse_of_optional(&priv->card, "audio-aux-devs",
> + snd_soc_of_parse_aux_devs);
snd_soc_of_parse_aux_devs already properly handle if the property is not
present. I'm not a fan of adding another level of function if it does
not bring anything valuable to the mix.
Could you add more context describing what you trying to accomplish with
this "card capsuling" thing ? A link to the RFC maybe ?
> if (ret)
> goto out_err;
--
Jerome
More information about the linux-arm-kernel
mailing list