]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: uniphier: Simplify clock handling with devm_clk_get_enabled()
authorPei Xiao <xiaopei01@kylinos.cn>
Tue, 7 Apr 2026 07:30:28 +0000 (15:30 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 7 Apr 2026 12:12:23 +0000 (13:12 +0100)
commitfdca270f8f87cae2eb5b619234b9dd11a863ce6b
treeb9366ed7fb7b96ea8fba1ef5548cca1ba841830b
parentbaa1cb259cc7f034435c3b8dad3e14267e2e6153
spi: uniphier: Simplify clock handling with devm_clk_get_enabled()

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 path and the remove callback. Adjust error labels accordingly.

Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://patch.msgid.link/b2deeefd4ef1a4bce71116aabfcb7e81400f6d37.1775546948.git.xiaopei01@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-uniphier.c