summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-24 13:51:32 +0900
committerMark Brown <broonie@linaro.org>2013-09-26 11:43:08 +0100
commit716db5d64f5f9bd6600cd4f85c2986d34cd7f60e (patch)
tree442986f0fc006d9dd47408475810f7a5c763ebb5 /drivers
parentf12f7318c44aa5ea1672f9a356de02a8739b6892 (diff)
downloadtalos-obmc-linux-716db5d64f5f9bd6600cd4f85c2986d34cd7f60e.tar.gz
talos-obmc-linux-716db5d64f5f9bd6600cd4f85c2986d34cd7f60e.zip
spi: tegra20-slink: 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')
-rw-r--r--drivers/spi/spi-tegra20-slink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index c70353672a23..829283e785d9 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -1164,7 +1164,7 @@ static int tegra_slink_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;
@@ -1191,7 +1191,6 @@ static int tegra_slink_remove(struct platform_device *pdev)
struct tegra_slink_data *tspi = spi_master_get_devdata(master);
free_irq(tspi->irq, tspi);
- spi_unregister_master(master);
if (tspi->tx_dma_chan)
tegra_slink_deinit_dma_param(tspi, false);
OpenPOWER on IntegriCloud