summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-mxs.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-24 13:32:56 +0900
committerMark Brown <broonie@linaro.org>2013-09-26 11:42:34 +0100
commit33e195acf2682627d9f4d9fb9c30a5dd5323bc5c (patch)
treed9820676b8b33cdd02545a5000be83e0f83d9c3c /drivers/spi/spi-mxs.c
parenteaa24297846bcdd98cefd52937ed88046a121ebc (diff)
downloadtalos-obmc-linux-33e195acf2682627d9f4d9fb9c30a5dd5323bc5c.tar.gz
talos-obmc-linux-33e195acf2682627d9f4d9fb9c30a5dd5323bc5c.zip
spi: mxs: use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler, and remove a duplicate put. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-mxs.c')
-rw-r--r--drivers/spi/spi-mxs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index de7b1141b90f..312c7f99c4a7 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -571,7 +571,7 @@ static int mxs_spi_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, master);
- ret = spi_register_master(master);
+ ret = devm_spi_register_master(&pdev->dev, master);
if (ret) {
dev_err(&pdev->dev, "Cannot register SPI master, %d\n", ret);
goto out_disable_clk;
@@ -598,10 +598,8 @@ static int mxs_spi_remove(struct platform_device *pdev)
spi = spi_master_get_devdata(master);
ssp = &spi->ssp;
- spi_unregister_master(master);
clk_disable_unprepare(ssp->clk);
dma_release_channel(ssp->dmach);
- spi_master_put(master);
return 0;
}
OpenPOWER on IntegriCloud