aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-tegra114.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-24 00:49:24 -0400
committerMark Brown <broonie@linaro.org>2013-09-26 06:43:07 -0400
commit5c8096439600de88a7ceded70cc86b817d4a548e (patch)
tree35f7b1649824efbf535a1dea0eb803f7cbfd4d8a /drivers/spi/spi-tegra114.c
parent1c43f2ae1ee3b04f7466e31a59b19b7fa5fe4fc2 (diff)
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>
Diffstat (limited to 'drivers/spi/spi-tegra114.c')
-rw-r--r--drivers/spi/spi-tegra114.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c
index 145dd435483b..bb3a19f2ed39 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)
1115 pm_runtime_put(&pdev->dev); 1115 pm_runtime_put(&pdev->dev);
1116 1116
1117 master->dev.of_node = pdev->dev.of_node; 1117 master->dev.of_node = pdev->dev.of_node;
1118 ret = spi_register_master(master); 1118 ret = devm_spi_register_master(&pdev->dev, master);
1119 if (ret < 0) { 1119 if (ret < 0) {
1120 dev_err(&pdev->dev, "can not register to master err %d\n", ret); 1120 dev_err(&pdev->dev, "can not register to master err %d\n", ret);
1121 goto exit_pm_disable; 1121 goto exit_pm_disable;
@@ -1142,7 +1142,6 @@ static int tegra_spi_remove(struct platform_device *pdev)
1142 struct tegra_spi_data *tspi = spi_master_get_devdata(master); 1142 struct tegra_spi_data *tspi = spi_master_get_devdata(master);
1143 1143
1144 free_irq(tspi->irq, tspi); 1144 free_irq(tspi->irq, tspi);
1145 spi_unregister_master(master);
1146 1145
1147 if (tspi->tx_dma_chan) 1146 if (tspi->tx_dma_chan)
1148 tegra_spi_deinit_dma_param(tspi, false); 1147 tegra_spi_deinit_dma_param(tspi, false);