(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

ASoC: jz4760: 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-3-jihed.chaibi.dev@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>


Author Jihed Chaibi Committer Mark Brown Date Commit Parent 9644e7f8
+4 -16
1 changed file
+4 -16
1 changed file