Skip to content

ASoC: jz47xx: Convert to devm_clk_get_enabled()

Jihed Chaibi linux-mips linux-sound lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ASoC: jz4725b: Convert to devm_clk_get_enabled()sound/soc/codecs/jz4725b.c+4 -141 reply
2/3ASoC: jz4760: Convert to devm_clk_get_enabled()sound/soc/codecs/jz4760.c+4 -160 replies
3/3ASoC: jz4770: Convert to devm_clk_get_enabled()sound/soc/codecs/jz4770.c+4 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] ASoC: jz47xx: Convert to devm_clk_get_enabled()

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.

Jihed Chaibi (3):
ASoC: jz4725b: Convert to devm_clk_get_enabled()
ASoC: jz4760: Convert to devm_clk_get_enabled()
ASoC: jz4770: Convert to devm_clk_get_enabled()

 sound/soc/codecs/jz4725b.c | 18 ++++--------------
 sound/soc/codecs/jz4760.c  | 20 ++++----------------
 sound/soc/codecs/jz4770.c  | 20 ++++----------------
 3 files changed, 12 insertions(+), 46 deletions(-)
Signature · 1 line
2.47.3