Unverified Commit a24802b0 authored by Gabor Juhos's avatar Gabor Juhos Committed by Mark Brown
Browse files

spi: spi-qpic-snand: simplify clock handling by using devm_clk_get_enabled()



The devm_clk_get_enabled() function prepares and enables the
particular clock, which then automatically gets disabled and
unprepared on probe failure and on device removal.

Use that function instead of devm_clk_get() and remove the
clk_prepare_enable()/clk_disable_unprepare() calls in order
to simplify the code.

This also ensures that the clocks are handled in the correct
order during device removal.

Signed-off-by: default avatarGabor Juhos <j4g8y7@gmail.com>
Link: https://patch.msgid.link/20250916-qpic-snand-devm_clk_get_enabled-v1-1-09953493b7f1@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ab63e991
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment