Re: [PATCH v2 05/21] ASoC: codecs: es8316: Move mclk acquisition to the i2c probe

From: Cezary Rojewski

Date: Wed Sep 23 2026 - 04:27:20 EST


On 9/23/2026 8:12 AM, Chancel Liu wrote:
> From: Chancel Liu <chancel.liu@xxxxxxx>
>
> component->dev is the underlying i2c device whose devres is only
> released on physical device removal, not on ASoC card unbind. Getting
> the mclk with devm_clk_get_optional(component->dev, ...) in the
> component probe therefore leaks a clk reference on every card
> bind/unbind cycle.
>
> Move the devm_clk_get_optional() to es8316_i2c_probe() so the clk
> reference is tied to the i2c device lifetime.
>
> Signed-off-by: Chancel Liu <chancel.liu@xxxxxxx>
Reviewed-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>