Skip to content

Commit

Permalink
spi: bfin-v3: use devm_spi_register_master()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Mark Brown committed Sep 26, 2013
1 parent bca7693 commit 6221df6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/spi/spi-bfin-v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 6221df6

Please sign in to comment.