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

Make sure to deregister the controller before disabling underlying
resources like interrupts during driver unbind to allow SPI drivers to
do I/O during deregistration.

Note that clocks were also disabled before the recent commit
e532e21a246d ("spi: bcm63xx-hsspi: Simplify clock handling with
devm_clk_get_enabled()").

Fixes: 7d255695804f ("spi/bcm63xx-hsspi: use devm_register_master()")
Cc: stable@vger.kernel.org # 3.14
Cc: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-7-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
ab837c51 c39e65a4

+7 -1
+7 -1
drivers/spi/spi-bcm63xx-hsspi.c
··· 857 857 } 858 858 859 859 /* register and we are done */ 860 - ret = devm_spi_register_controller(dev, host); 860 + ret = spi_register_controller(host); 861 861 if (ret) 862 862 goto out_sysgroup_disable; 863 863 ··· 880 880 struct spi_controller *host = platform_get_drvdata(pdev); 881 881 struct bcm63xx_hsspi *bs = spi_controller_get_devdata(host); 882 882 883 + spi_controller_get(host); 884 + 885 + spi_unregister_controller(host); 886 + 883 887 /* reset the hardware and block queue progress */ 884 888 __raw_writel(0, bs->regs + HSSPI_INT_MASK_REG); 885 889 sysfs_remove_group(&pdev->dev.kobj, &bcm63xx_hsspi_group); 890 + 891 + spi_controller_put(host); 886 892 } 887 893 888 894 #ifdef CONFIG_PM_SLEEP