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: bcmbca-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: a38a2233f23b ("spi: bcmbca-hsspi: Add driver for newer HSSPI controller")
Cc: stable@vger.kernel.org # 6.3: deb269e0394f
Cc: stable@vger.kernel.org # 6.3
Cc: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-8-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
c3d97c33 ab837c51

+3 -1
+3 -1
drivers/spi/spi-bcmbca-hsspi.c
··· 538 538 return dev_err_probe(dev, ret, "couldn't register sysfs group\n"); 539 539 540 540 /* register and we are done */ 541 - ret = devm_spi_register_controller(dev, host); 541 + ret = spi_register_controller(host); 542 542 if (ret) 543 543 goto out_sysgroup_disable; 544 544 ··· 555 555 { 556 556 struct spi_controller *host = platform_get_drvdata(pdev); 557 557 struct bcmbca_hsspi *bs = spi_controller_get_devdata(host); 558 + 559 + spi_unregister_controller(host); 558 560 559 561 /* reset the hardware and block queue progress */ 560 562 __raw_writel(0, bs->regs + HSSPI_INT_MASK_REG);