aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-24 00:46:55 -0400
committerMark Brown <broonie@linaro.org>2013-09-26 06:42:52 -0400
commita807fcd090d6e778717d0954fc6a58a72ee16ba0 (patch)
treed9402b491e8d3852b6ac89b1a4178344589cccd2
parent35794a77168b739bbc758b6c5b11c78572188d77 (diff)
spi: pxa2xx: 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-pxa2xx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 2eb06ee0b326..669306aa6c29 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1196,7 +1196,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
1196 1196
1197 /* Register with the SPI framework */ 1197 /* Register with the SPI framework */
1198 platform_set_drvdata(pdev, drv_data); 1198 platform_set_drvdata(pdev, drv_data);
1199 status = spi_register_master(master); 1199 status = devm_spi_register_master(&pdev->dev, master);
1200 if (status != 0) { 1200 if (status != 0) {
1201 dev_err(&pdev->dev, "problem registering spi master\n"); 1201 dev_err(&pdev->dev, "problem registering spi master\n");
1202 goto out_error_clock_enabled; 1202 goto out_error_clock_enabled;
@@ -1248,9 +1248,6 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)
1248 /* Release SSP */ 1248 /* Release SSP */
1249 pxa_ssp_free(ssp); 1249 pxa_ssp_free(ssp);
1250 1250
1251 /* Disconnect from the SPI framework */
1252 spi_unregister_master(drv_data->master);
1253
1254 return 0; 1251 return 0;
1255} 1252}
1256 1253