diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-24 04:49:24 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-26 10:43:07 (GMT) |
commit | 5c8096439600de88a7ceded70cc86b817d4a548e (patch) | |
tree | 35f7b1649824efbf535a1dea0eb803f7cbfd4d8a | |
parent | 1c43f2ae1ee3b04f7466e31a59b19b7fa5fe4fc2 (diff) | |
download | linux-5c8096439600de88a7ceded70cc86b817d4a548e.tar.xz |
spi: tegra114: use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/spi/spi-tegra114.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 145dd43..bb3a19f 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -1115,7 +1115,7 @@ static int tegra_spi_probe(struct platform_device *pdev) pm_runtime_put(&pdev->dev); master->dev.of_node = pdev->dev.of_node; - ret = spi_register_master(master); + ret = devm_spi_register_master(&pdev->dev, master); if (ret < 0) { dev_err(&pdev->dev, "can not register to master err %d\n", ret); goto exit_pm_disable; @@ -1142,7 +1142,6 @@ static int tegra_spi_remove(struct platform_device *pdev) struct tegra_spi_data *tspi = spi_master_get_devdata(master); free_irq(tspi->irq, tspi); - spi_unregister_master(master); if (tspi->tx_dma_chan) tegra_spi_deinit_dma_param(tspi, false); |