diff mbox

[2/3] spi/bcm63xx-hsspi: use devm_register_master()

Message ID 1387313088-22493-3-git-send-email-jogo@openwrt.org (mailing list archive)
State Accepted
Commit 7d255695804fbe7b2c30bcd54c1faf1d0918443c
Delegated to: Mark Brown
Headers show

Commit Message

Jonas Gorski Dec. 17, 2013, 8:44 p.m. UTC
Simplifies the remove call.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
 drivers/spi/spi-bcm63xx-hsspi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
index 949dfb5..1721ea9 100644
--- a/drivers/spi/spi-bcm63xx-hsspi.c
+++ b/drivers/spi/spi-bcm63xx-hsspi.c
@@ -399,7 +399,7 @@  static int bcm63xx_hsspi_probe(struct platform_device *pdev)
 		goto out_put_master;
 
 	/* register and we are done */
-	ret = spi_register_master(master);
+	ret = devm_spi_register_master(dev, master);
 	if (ret)
 		goto out_put_master;
 
@@ -418,8 +418,6 @@  static int bcm63xx_hsspi_remove(struct platform_device *pdev)
 	struct spi_master *master = platform_get_drvdata(pdev);
 	struct bcm63xx_hsspi *bs = spi_master_get_devdata(master);
 
-	spi_unregister_master(master);
-
 	/* reset the hardware and block queue progress */
 	__raw_writel(0, bs->regs + HSSPI_INT_MASK_REG);
 	clk_disable_unprepare(bs->clk);