diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-24 00:30:41 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-26 06:42:32 -0400 |
commit | 434eaf3b231125c73450bbc6ebe2396b9b63aa2f (patch) | |
tree | 6ae6ca54a9416b50ffd3ca7072c7e550056d21bf | |
parent | c493fc4bbd4f27b1a8a141648df866c386441b70 (diff) |
spi: ep93xx: 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-ep93xx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index d22c00a227b6..486fb6deab05 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c | |||
@@ -942,7 +942,7 @@ static int ep93xx_spi_probe(struct platform_device *pdev) | |||
942 | /* make sure that the hardware is disabled */ | 942 | /* make sure that the hardware is disabled */ |
943 | ep93xx_spi_write_u8(espi, SSPCR1, 0); | 943 | ep93xx_spi_write_u8(espi, SSPCR1, 0); |
944 | 944 | ||
945 | error = spi_register_master(master); | 945 | error = devm_spi_register_master(&pdev->dev, master); |
946 | if (error) { | 946 | if (error) { |
947 | dev_err(&pdev->dev, "failed to register SPI master\n"); | 947 | dev_err(&pdev->dev, "failed to register SPI master\n"); |
948 | goto fail_free_dma; | 948 | goto fail_free_dma; |
@@ -968,7 +968,6 @@ static int ep93xx_spi_remove(struct platform_device *pdev) | |||
968 | 968 | ||
969 | ep93xx_spi_release_dma(espi); | 969 | ep93xx_spi_release_dma(espi); |
970 | 970 | ||
971 | spi_unregister_master(master); | ||
972 | return 0; | 971 | return 0; |
973 | } | 972 | } |
974 | 973 | ||