aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-12-04 00:13:50 -0500
committerMark Brown <broonie@linaro.org>2013-12-09 12:59:58 -0500
commit9e03d05eee4ca45ed12749ef6c26bf616262cdd2 (patch)
tree1ecbcedec82171bd21a4a619c66a48326f474a61
parente80b89ee2ace3a959c44c834231851fc5242eb13 (diff)
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>
-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)
887{ 887{
888 struct rspi_data *rspi = platform_get_drvdata(pdev); 888 struct rspi_data *rspi = platform_get_drvdata(pdev);
889 889
890 spi_unregister_master(rspi->master);
891 rspi_release_dma(rspi); 890 rspi_release_dma(rspi);
892 891
893 return 0; 892 return 0;
@@ -972,7 +971,7 @@ static int rspi_probe(struct platform_device *pdev)
972 goto error2; 971 goto error2;
973 } 972 }
974 973
975 ret = spi_register_master(master); 974 ret = devm_spi_register_master(&pdev->dev, master);
976 if (ret < 0) { 975 if (ret < 0) {
977 dev_err(&pdev->dev, "spi_register_master error.\n"); 976 dev_err(&pdev->dev, "spi_register_master error.\n");
978 goto error2; 977 goto error2;