Skip to content

Commit 047f939

Browse files
jhovoldgregkh
authored andcommitted
spi: bcmbca-hsspi: fix controller deregistration
commit c3d97c3 upstream. 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 e532e21 ("spi: bcm63xx-hsspi: Simplify clock handling with devm_clk_get_enabled()"). Fixes: a38a223 ("spi: bcmbca-hsspi: Add driver for newer HSSPI controller") Cc: stable@vger.kernel.org # 6.3: deb269e 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ca3195c commit 047f939

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/spi/spi-bcmbca-hsspi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ static int bcmbca_hsspi_probe(struct platform_device *pdev)
550550
}
551551

552552
/* register and we are done */
553-
ret = devm_spi_register_controller(dev, host);
553+
ret = spi_register_controller(host);
554554
if (ret)
555555
goto out_sysgroup_disable;
556556

@@ -572,6 +572,8 @@ static void bcmbca_hsspi_remove(struct platform_device *pdev)
572572
struct spi_controller *host = platform_get_drvdata(pdev);
573573
struct bcmbca_hsspi *bs = spi_controller_get_devdata(host);
574574

575+
spi_unregister_controller(host);
576+
575577
/* reset the hardware and block queue progress */
576578
__raw_writel(0, bs->regs + HSSPI_INT_MASK_REG);
577579
clk_disable_unprepare(bs->pll_clk);

0 commit comments

Comments
 (0)