]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: jz4770: Convert to devm_clk_get_enabled()
authorJihed Chaibi <jihed.chaibi.dev@gmail.com>
Mon, 23 Mar 2026 16:15:51 +0000 (17:15 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 30 Mar 2026 18:40:29 +0000 (19:40 +0100)
commit7dcb79e5c03f2df84f780469a10e92c6a126314f
tree7c52bce590757eca40551857c92ba9a48c837359
parent00df61cbc78ecad5b4bf8552eab5bbf4301bfc0d
ASoC: jz4770: Convert to devm_clk_get_enabled()

The clock is obtained with devm_clk_get() in the platform probe, then
manually enabled in the component probe and disabled in the component
remove without checking the return value of clk_prepare_enable().

Use devm_clk_get_enabled() instead, which combines the get, prepare and
enable operations into one call whose lifetime is tied to the device.
This removes the need for explicit enable/disable in the component
probe/remove callbacks, and ensures that clock enable failures are
propagated as errors rather than silently ignored.

Remove the now-unused struct clk pointer from struct jz_codec and drop
the empty component remove callback.

Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
Link: https://patch.msgid.link/20260323161551.47181-4-jihed.chaibi.dev@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/jz4770.c