summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pxa2xx.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-05-30 00:03:51 +0100
committerMark Brown <broonie@kernel.org>2020-05-30 00:03:51 +0100
commit0c0c5b8fabe596a7322f0b9b93b88f489b3f4bb3 (patch)
treeb137f835d2b336cbb68977ca16169b8f1ed14286 /drivers/spi/spi-pxa2xx.c
parent9cb1fd0efd195590b828b9b865421ad345a4a145 (diff)
parent65e318e17358a3fd4fcb5a69d89b14016dee2f06 (diff)
downloadlinux-0c0c5b8fabe596a7322f0b9b93b88f489b3f4bb3.tar.bz2
Merge remote-tracking branch 'spi/for-5.7' into spi-linus
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r--drivers/spi/spi-pxa2xx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 73d2a65d0b6e..f6e87344a36c 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1884,7 +1884,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
/* Register with the SPI framework */
platform_set_drvdata(pdev, drv_data);
- status = devm_spi_register_controller(&pdev->dev, controller);
+ status = spi_register_controller(controller);
if (status != 0) {
dev_err(&pdev->dev, "problem registering spi controller\n");
goto out_error_pm_runtime_enabled;
@@ -1893,7 +1893,6 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
return status;
out_error_pm_runtime_enabled:
- pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
out_error_clock_enabled:
@@ -1916,6 +1915,8 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)
pm_runtime_get_sync(&pdev->dev);
+ spi_unregister_controller(drv_data->controller);
+
/* Disable the SSP at the peripheral and SOC level */
pxa2xx_spi_write(drv_data, SSCR0, 0);
clk_disable_unprepare(ssp->clk);