提交 8901e1b9 编写于 作者: A Axel Lin 提交者: Grant Likely

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: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 680c1305
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册