+17
−45
Loading
Replace devm_clk_get() followed by clk_prepare_enable() with devm_clk_get_enabled() for the clock. This removes the need for explicit clock enable and disable calls, as the managed API automatically handles clock disabling on device removal or probe failure. Remove the now-unnecessary clk_disable_unprepare() calls from the probe error paths and the remove callback. Also simplify error handling by using dev_err_probe(). Signed-off-by:Pei Xiao <xiaopei01@kylinos.cn> Acked-by:
Alain Volmat <alain.volmat@foss.st.com> Reviewed-by:
Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://patch.msgid.link/c8259f582596fd08541b94dce5dbb4cae513e295.1773885292.git.xiaopei01@kylinos.cn Signed-off-by:
Mark Brown <broonie@kernel.org>