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

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

Fixes: b42dfed83d95 ("spi: add Broadcom BCM63xx SPI controller driver")
Cc: stable@vger.kernel.org # 3.4
Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260409120419.388546-6-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
c39e65a4 8d4de97e

+7 -1
+7 -1
drivers/spi/spi-bcm63xx.c
··· 602 602 goto out_clk_disable; 603 603 604 604 /* register and we are done */ 605 - ret = devm_spi_register_controller(dev, host); 605 + ret = spi_register_controller(host); 606 606 if (ret) { 607 607 dev_err(dev, "spi register failed\n"); 608 608 goto out_clk_disable; ··· 625 625 struct spi_controller *host = platform_get_drvdata(pdev); 626 626 struct bcm63xx_spi *bs = spi_controller_get_devdata(host); 627 627 628 + spi_controller_get(host); 629 + 630 + spi_unregister_controller(host); 631 + 628 632 /* reset spi block */ 629 633 bcm_spi_writeb(bs, 0, SPI_INT_MASK); 630 634 631 635 /* HW shutdown */ 632 636 clk_disable_unprepare(bs->clk); 637 + 638 + spi_controller_put(host); 633 639 } 634 640 635 641 static int bcm63xx_spi_suspend(struct device *dev)