summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-rspi.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-12-04 14:13:50 +0900
committerMark Brown <broonie@linaro.org>2013-12-09 17:59:58 +0000
commit9e03d05eee4ca45ed12749ef6c26bf616262cdd2 (patch)
tree1ecbcedec82171bd21a4a619c66a48326f474a61 /drivers/spi/spi-rspi.c
parente80b89ee2ace3a959c44c834231851fc5242eb13 (diff)
downloadlinux-stable-9e03d05eee4ca45ed12749ef6c26bf616262cdd2.tar.gz
linux-stable-9e03d05eee4ca45ed12749ef6c26bf616262cdd2.tar.bz2
linux-stable-9e03d05eee4ca45ed12749ef6c26bf616262cdd2.zip
spi: rcar: 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-rspi.c')
-rw-r--r--drivers/spi/spi-rspi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 19c65c43cbc5..cfdbb422a40a 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -887,7 +887,6 @@ static int rspi_remove(struct platform_device *pdev)
{
struct rspi_data *rspi = platform_get_drvdata(pdev);
- spi_unregister_master(rspi->master);
rspi_release_dma(rspi);
return 0;
@@ -972,7 +971,7 @@ static int rspi_probe(struct platform_device *pdev)
goto error2;
}
- ret = spi_register_master(master);
+ ret = devm_spi_register_master(&pdev->dev, master);
if (ret < 0) {
dev_err(&pdev->dev, "spi_register_master error.\n");
goto error2;