Merge branch 'for-5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-2.6-microblaze.git] / drivers / spi / spi-bcm2835.c
index cad3458..06d2782 100644 (file)
@@ -1351,7 +1351,7 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
                goto out_dma_release;
        }
 
-       err = devm_spi_register_controller(&pdev->dev, ctlr);
+       err = spi_register_controller(ctlr);
        if (err) {
                dev_err(&pdev->dev, "could not register SPI controller: %d\n",
                        err);
@@ -1378,6 +1378,8 @@ static int bcm2835_spi_remove(struct platform_device *pdev)
 
        bcm2835_debugfs_remove(bs);
 
+       spi_unregister_controller(ctlr);
+
        /* Clear FIFOs, and disable the HW block */
        bcm2835_wr(bs, BCM2835_SPI_CS,
                   BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);