Skip to content

Commit

Permalink
spi: ep93xx: 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>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Jingoo Han authored and Mark Brown committed Sep 26, 2013
1 parent c493fc4 commit 434eaf3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/spi/spi-ep93xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ static int ep93xx_spi_probe(struct platform_device *pdev)
/* make sure that the hardware is disabled */
ep93xx_spi_write_u8(espi, SSPCR1, 0);

error = spi_register_master(master);
error = devm_spi_register_master(&pdev->dev, master);
if (error) {
dev_err(&pdev->dev, "failed to register SPI master\n");
goto fail_free_dma;
Expand All @@ -968,7 +968,6 @@ static int ep93xx_spi_remove(struct platform_device *pdev)

ep93xx_spi_release_dma(espi);

spi_unregister_master(master);
return 0;
}

Expand Down

0 comments on commit 434eaf3

Please sign in to comment.