diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-05-11 21:28:16 +0800 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-05-20 00:43:07 -0600 |
commit | 8901e1b98e1dad75c4567d03dd00a59bd6c450e8 (patch) | |
tree | c5c78d6bc7bd6b0500503ed4523bb08fa6414e33 /drivers/spi | |
parent | 680c1305e259a488f489bc887854523b6c6e0705 (diff) | |
download | linux-stable-8901e1b98e1dad75c4567d03dd00a59bd6c450e8.tar.gz linux-stable-8901e1b98e1dad75c4567d03dd00a59bd6c450e8.tar.bz2 linux-stable-8901e1b98e1dad75c4567d03dd00a59bd6c450e8.zip |
spi/spi_tegra: use spi_unregister_master() instead of spi_master_put()
spi_master_put() should only be used in error handling.
Once spi_register_master() returns success, we should call
spi_unregister_master() instead.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi_tegra.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi_tegra.c b/drivers/spi/spi_tegra.c index 891e5909038c..6c3aa6ecaade 100644 --- a/drivers/spi/spi_tegra.c +++ b/drivers/spi/spi_tegra.c @@ -578,6 +578,7 @@ static int __devexit spi_tegra_remove(struct platform_device *pdev) master = dev_get_drvdata(&pdev->dev); tspi = spi_master_get_devdata(master); + spi_unregister_master(master); tegra_dma_free_channel(tspi->rx_dma); dma_free_coherent(&pdev->dev, sizeof(u32) * BB_LEN, @@ -586,7 +587,6 @@ static int __devexit spi_tegra_remove(struct platform_device *pdev) clk_put(tspi->clk); iounmap(tspi->base); - spi_master_put(master); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); release_mem_region(r->start, (r->end - r->start) + 1); |