Commit 5c809643 authored by Jingoo Han's avatar Jingoo Han Committed by Mark Brown

spi: tegra114: use devm_spi_register_master()

Use devm_spi_register_master() to make cleanup paths simpler.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 1c43f2ae
...@@ -1115,7 +1115,7 @@ static int tegra_spi_probe(struct platform_device *pdev) ...@@ -1115,7 +1115,7 @@ static int tegra_spi_probe(struct platform_device *pdev)
pm_runtime_put(&pdev->dev); pm_runtime_put(&pdev->dev);
master->dev.of_node = pdev->dev.of_node; master->dev.of_node = pdev->dev.of_node;
ret = spi_register_master(master); ret = devm_spi_register_master(&pdev->dev, master);
if (ret < 0) { if (ret < 0) {
dev_err(&pdev->dev, "can not register to master err %d\n", ret); dev_err(&pdev->dev, "can not register to master err %d\n", ret);
goto exit_pm_disable; goto exit_pm_disable;
...@@ -1142,7 +1142,6 @@ static int tegra_spi_remove(struct platform_device *pdev) ...@@ -1142,7 +1142,6 @@ static int tegra_spi_remove(struct platform_device *pdev)
struct tegra_spi_data *tspi = spi_master_get_devdata(master); struct tegra_spi_data *tspi = spi_master_get_devdata(master);
free_irq(tspi->irq, tspi); free_irq(tspi->irq, tspi);
spi_unregister_master(master);
if (tspi->tx_dma_chan) if (tspi->tx_dma_chan)
tegra_spi_deinit_dma_param(tspi, false); tegra_spi_deinit_dma_param(tspi, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment