Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: syncuacer: fix controller deregistration

Make sure to deregister the controller before disabling underlying
resources like clocks during driver unbind.

Fixes: b0823ee35cf9 ("spi: Add spi driver for Socionext SynQuacer platform")
Cc: stable@vger.kernel.org # 5.3
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260410081757.503099-21-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
75d849c3 d874a1c3

+7 -1
+7 -1
drivers/spi/spi-synquacer.c
··· 716 716 pm_runtime_set_active(sspi->dev); 717 717 pm_runtime_enable(sspi->dev); 718 718 719 - ret = devm_spi_register_controller(sspi->dev, host); 719 + ret = spi_register_controller(host); 720 720 if (ret) 721 721 goto disable_pm; 722 722 ··· 737 737 struct spi_controller *host = platform_get_drvdata(pdev); 738 738 struct synquacer_spi *sspi = spi_controller_get_devdata(host); 739 739 740 + spi_controller_get(host); 741 + 742 + spi_unregister_controller(host); 743 + 740 744 pm_runtime_disable(sspi->dev); 741 745 742 746 clk_disable_unprepare(sspi->clk); 747 + 748 + spi_controller_put(host); 743 749 } 744 750 745 751 static int __maybe_unused synquacer_spi_suspend(struct device *dev)