]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jul 2021 11:30:55 +0000 (13:30 +0200)
commit3b0c2f88b4cf4ab20b9b946085f9afd326d9c1af
tree7b1edc8883af7c937d36900bdf7f8864fb785c5d
parent31c86b132900f64e3bbc7be4dd70e1d27c9262cd
spi: stm32: fixes pm_runtime calls in probe/remove

[ Upstream commit 7999d2555c9f879d006ea8469d74db9cdb038af0 ]

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: 0b76f77a37f2 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-stm32.c