]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: jz47xx: Convert to devm_clk_get_enabled()
authorMark Brown <broonie@kernel.org>
Mon, 30 Mar 2026 18:40:31 +0000 (19:40 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 30 Mar 2026 18:40:31 +0000 (19:40 +0100)
commit18cc8cc30b71feaec4d80724917f91782987a4a7
treeb0a5c0bb153908370ec4c227644a3b5b8bd67933
parentb81f63108250818ed17fc7df9fdf9a7fb84f3f69
parent7dcb79e5c03f2df84f780469a10e92c6a126314f
ASoC: jz47xx: Convert to devm_clk_get_enabled()

Jihed Chaibi <jihed.chaibi.dev@gmail.com> says:

The jz4725b, jz4760 and jz4770 Ingenic codec drivers all share the same
clock management pattern: 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. The clk_prepare_enable() call in the
component probe is unchecked, meaning clock enable failures are silently
ignored and can lead to register access on unpowered hardware.

This series converts all three drivers to devm_clk_get_enabled(), which
combines the get, prepare and enable steps and ties the clock lifetime to
the device via devres. The now-redundant component remove callbacks and
the struct clk pointers in the private structs are removed.