aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi-omap2-mcspi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index ed4af4708d9a..2f7fd35a9ac8 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1407,7 +1407,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
1407 if (status < 0) 1407 if (status < 0)
1408 goto disable_pm; 1408 goto disable_pm;
1409 1409
1410 status = spi_register_master(master); 1410 status = devm_spi_register_master(&pdev->dev, master);
1411 if (status < 0) 1411 if (status < 0)
1412 goto disable_pm; 1412 goto disable_pm;
1413 1413
@@ -1435,7 +1435,6 @@ static int omap2_mcspi_remove(struct platform_device *pdev)
1435 pm_runtime_put_sync(mcspi->dev); 1435 pm_runtime_put_sync(mcspi->dev);
1436 pm_runtime_disable(&pdev->dev); 1436 pm_runtime_disable(&pdev->dev);
1437 1437
1438 spi_unregister_master(master);
1439 kfree(dma_channels); 1438 kfree(dma_channels);
1440 1439
1441 return 0; 1440 return 0;