]> git.baikalelectronics.ru Git - kernel.git/commit
spi: stm32: fixes pm_runtime calls in probe/remove
authorAlain Volmat <alain.volmat@foss.st.com>
Wed, 7 Jul 2021 08:27:00 +0000 (10:27 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 7 Jul 2021 16:33:52 +0000 (17:33 +0100)
commit55242cc05c52fb88f25f65f0ebcd47a149842f39
treec617c8ab94c46fe39a98dc868218274dc1b9d9eb
parent170e814ea29ca43cfea7866381c187d37e4ae379
spi: stm32: fixes pm_runtime calls in probe/remove

Add pm_runtime calls in probe/probe error path and remove
in order to be consistent in all places in ordering and
ensure that pm_runtime is disabled prior to resources used
by the SPI controller.

This patch also fixes the 2 following warnings on driver remove:
WARNING: CPU: 0 PID: 743 at drivers/clk/clk.c:594 clk_core_disable_lock+0x18/0x24
WARNING: CPU: 0 PID: 743 at drivers/clk/clk.c:476 clk_unprepare+0x24/0x2c

Fixes: a3c354a6120a ("spi: stm32: add runtime PM support")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://lore.kernel.org/r/1625646426-5826-2-git-send-email-alain.volmat@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c