]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: spi-qpic-snand: simplify clock handling by using devm_clk_get_enabled()
authorGabor Juhos <j4g8y7@gmail.com>
Tue, 16 Sep 2025 17:43:46 +0000 (19:43 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 18 Sep 2025 21:26:57 +0000 (22:26 +0100)
commita24802b0a2a238eaa610b0b0e87a4500a35de64a
tree47b57959e4e4e007af7caf7bdb792cfdbd2e56dc
parentab63e9910d2d3ea4b8e6c08812258a676defcb9c
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: Gabor Juhos <j4g8y7@gmail.com>
Link: https://patch.msgid.link/20250916-qpic-snand-devm_clk_get_enabled-v1-1-09953493b7f1@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-qpic-snand.c