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: cadence: fix controller deregistration

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

Fixes: c474b3866546 ("spi: Add driver for Cadence SPI controller")
Cc: stable@vger.kernel.org # 3.16
Cc: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260414134319.978196-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
666fa7e9 028ef9c9

+5 -1
+5 -1
drivers/spi/spi-cadence.c
··· 777 777 struct spi_controller *ctlr = platform_get_drvdata(pdev); 778 778 struct cdns_spi *xspi = spi_controller_get_devdata(ctlr); 779 779 780 + spi_controller_get(ctlr); 781 + 782 + spi_unregister_controller(ctlr); 783 + 780 784 cdns_spi_write(xspi, CDNS_SPI_ER, CDNS_SPI_ER_DISABLE); 781 785 782 786 if (!spi_controller_is_target(ctlr)) { ··· 788 784 pm_runtime_set_suspended(&pdev->dev); 789 785 } 790 786 791 - spi_unregister_controller(ctlr); 787 + spi_controller_put(ctlr); 792 788 } 793 789 794 790 /**