diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-24 08:26:30 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-26 14:42:23 +0400 |
commit | 6221df6d88b847da0803b2ced7826f005e62c837 (patch) | |
tree | b959403309ac8ed5e33d2fbec742749ef4a123f8 /drivers/spi/spi-bfin-v3.c | |
parent | bca76931b934ad323c56d9aab7a74139306d18bf (diff) | |
download | linux-6221df6d88b847da0803b2ced7826f005e62c837.tar.xz |
spi: bfin-v3: use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-bfin-v3.c')
-rw-r--r-- | drivers/spi/spi-bfin-v3.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-bfin-v3.c b/drivers/spi/spi-bfin-v3.c index f4bf81347d68..8f8598834b30 100644 --- a/drivers/spi/spi-bfin-v3.c +++ b/drivers/spi/spi-bfin-v3.c @@ -867,7 +867,7 @@ static int bfin_spi_probe(struct platform_device *pdev) tasklet_init(&drv_data->pump_transfers, bfin_spi_pump_transfers, (unsigned long)drv_data); /* register with the SPI framework */ - ret = spi_register_master(master); + ret = devm_spi_register_master(dev, master); if (ret) { dev_err(dev, "can not register spi master\n"); goto err_free_peripheral; @@ -898,7 +898,6 @@ static int bfin_spi_remove(struct platform_device *pdev) free_dma(drv_data->rx_dma); free_dma(drv_data->tx_dma); - spi_unregister_master(drv_data->master); return 0; } |