summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-sh-hspi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-sh-hspi.c')
-rw-r--r--drivers/spi/spi-sh-hspi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c
index 8a147d92f9eb..292567ab4c6c 100644
--- a/drivers/spi/spi-sh-hspi.c
+++ b/drivers/spi/spi-sh-hspi.c
@@ -306,7 +306,7 @@ static int hspi_probe(struct platform_device *pdev)
master->dev.of_node = pdev->dev.of_node;
master->auto_runtime_pm = true;
master->transfer_one_message = hspi_transfer_one_message;
- ret = spi_register_master(master);
+ ret = devm_spi_register_master(&pdev->dev, master);
if (ret < 0) {
dev_err(&pdev->dev, "spi_register_master error.\n");
goto error1;
@@ -329,7 +329,6 @@ static int hspi_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
clk_put(hspi->clk);
- spi_unregister_master(hspi->master);
return 0;
}