diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-24 13:46:55 +0900 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-26 11:42:52 +0100 |
commit | a807fcd090d6e778717d0954fc6a58a72ee16ba0 (patch) | |
tree | d9402b491e8d3852b6ac89b1a4178344589cccd2 /drivers/spi/spi-pxa2xx.c | |
parent | 35794a77168b739bbc758b6c5b11c78572188d77 (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>
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r-- | drivers/spi/spi-pxa2xx.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 2eb06ee0b32..669306aa6c2 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) /* Register with the SPI framework */ platform_set_drvdata(pdev, drv_data); - status = spi_register_master(master); + status = devm_spi_register_master(&pdev->dev, master); if (status != 0) { dev_err(&pdev->dev, "problem registering spi master\n"); goto out_error_clock_enabled; @@ -1248,9 +1248,6 @@ static int pxa2xx_spi_remove(struct platform_device *pdev) /* Release SSP */ pxa_ssp_free(ssp); - /* Disconnect from the SPI framework */ - spi_unregister_master(drv_data->master); - return 0; } |