Re: [PATCH 3/4] ASoC: audio-graph-card: Free jack GPIOs on card remove

From: Chancel Liu

Date: Mon Sep 14 2026 - 22:47:48 EST


Hi Kuninori

Thank you for the review and the Ack.

> Hi Chancel
>
> Thank you for the patch
>
>> --- a/sound/soc/generic/audio-graph-card.c
>> +++ b/sound/soc/generic/audio-graph-card.c
>> @@ -629,6 +629,7 @@ static int graph_probe(struct platform_device *pdev)
>> card->dapm_widgets = graph_dapm_widgets;
>> card->num_dapm_widgets = ARRAY_SIZE(graph_dapm_widgets);
>> card->probe = graph_util_card_probe;
>> + card->remove = graph_util_card_remove;
>
> Basically it looks good to me, but tegra_audio_graph_card is
> using graph_util_card_probe(), too. Please care about this driver.
>
> ${LINUX}/sound/soc/tegra/tegra_audio_graph_card.c
>
> Except above,
>
> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
>
> Thank you for your help !!
>
> Best regards
> ---
> Kuninori Morimoto

For this series I would like to keep the scope limited to the generic
cards. If this approach can be accepted, we can extend this fix to other
cards.

tegra_audio_graph_card has a slightly more complicated card->probe. It
also handles some clocks besides calling graph_util_card_probe(). So I
think this driver leaks both the clocks and the jack resources on card
unbind/rebind. I prefer a separate patch to fix tegra_audio_graph_card.

Regards,
Chancel Liu