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

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

Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers")
Cc: stable@vger.kernel.org # 6.0
Cc: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260409120419.388546-21-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
573c7db8 d00d722e

+3 -1
+3 -1
drivers/spi/spi-mpfs.c
··· 574 574 575 575 mpfs_spi_init(host, spi); 576 576 577 - ret = devm_spi_register_controller(&pdev->dev, host); 577 + ret = spi_register_controller(host); 578 578 if (ret) { 579 579 mpfs_spi_disable_ints(spi); 580 580 mpfs_spi_disable(spi); ··· 591 591 { 592 592 struct spi_controller *host = platform_get_drvdata(pdev); 593 593 struct mpfs_spi *spi = spi_controller_get_devdata(host); 594 + 595 + spi_unregister_controller(host); 594 596 595 597 mpfs_spi_disable_ints(spi); 596 598 mpfs_spi_disable(spi);