Skip to content

Commit

Permalink
spi: tegra114: use devm_spi_register_master()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Mark Brown committed Sep 26, 2013
1 parent 1c43f2a commit 5c80964
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/spi/spi-tegra114.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 5c80964

Please sign in to comment.