diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-24 13:50:25 +0900 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-26 11:43:07 +0100 |
commit | f12f7318c44aa5ea1672f9a356de02a8739b6892 (patch) | |
tree | 713d84f31b901e12f4a645fa6e4055456db0381f /drivers/spi/spi-tegra20-sflash.c | |
parent | 5c8096439600de88a7ceded70cc86b817d4a548e (diff) |
spi: tegra20-sflash: 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-tegra20-sflash.c')
-rw-r--r-- | drivers/spi/spi-tegra20-sflash.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index 1d814dc6e000..a68d7797a8ec 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c @@ -529,7 +529,7 @@ static int tegra_sflash_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; @@ -553,7 +553,6 @@ static int tegra_sflash_remove(struct platform_device *pdev) struct tegra_sflash_data *tsd = spi_master_get_devdata(master); free_irq(tsd->irq, tsd); - spi_unregister_master(master); pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) |