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

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

Fixes: 17f84b793c01 ("spi: lantiq-ssc: add support for Lantiq SSC SPI controller")
Cc: stable@vger.kernel.org # 4.11
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-17-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
b9920671 fc3a83b0

+7 -1
+7 -1
drivers/spi/spi-lantiq-ssc.c
··· 994 994 "Lantiq SSC SPI controller (Rev %i, TXFS %u, RXFS %u, DMA %u)\n", 995 995 revision, spi->tx_fifo_size, spi->rx_fifo_size, supports_dma); 996 996 997 - err = devm_spi_register_controller(dev, host); 997 + err = spi_register_controller(host); 998 998 if (err) { 999 999 dev_err(dev, "failed to register spi host\n"); 1000 1000 goto err_wq_destroy; ··· 1016 1016 { 1017 1017 struct lantiq_ssc_spi *spi = platform_get_drvdata(pdev); 1018 1018 1019 + spi_controller_get(spi->host); 1020 + 1021 + spi_unregister_controller(spi->host); 1022 + 1019 1023 lantiq_ssc_writel(spi, 0, LTQ_SPI_IRNEN); 1020 1024 lantiq_ssc_writel(spi, 0, LTQ_SPI_CLC); 1021 1025 rx_fifo_flush(spi); ··· 1028 1024 1029 1025 destroy_workqueue(spi->wq); 1030 1026 clk_put(spi->fpi_clk); 1027 + 1028 + spi_controller_put(spi->host); 1031 1029 } 1032 1030 1033 1031 static struct platform_driver lantiq_ssc_driver = {