diff options
author | Jonas Gorski <jogo@openwrt.org> | 2013-12-17 15:44:47 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-17 17:32:17 -0500 |
commit | 7d255695804fbe7b2c30bcd54c1faf1d0918443c (patch) | |
tree | 2cb92a8e0191521bdd910dfe8e5e4393d4d02598 /drivers/spi/spi-bcm63xx-hsspi.c | |
parent | dea5de1b37c08bc8a028b6a53145b7594ba6eb31 (diff) |
spi/bcm63xx-hsspi: use devm_register_master()
Simplifies the remove call.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-bcm63xx-hsspi.c')
-rw-r--r-- | drivers/spi/spi-bcm63xx-hsspi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 949dfb57fe89..1721ea99d688 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) | |||
399 | goto out_put_master; | 399 | goto out_put_master; |
400 | 400 | ||
401 | /* register and we are done */ | 401 | /* register and we are done */ |
402 | ret = spi_register_master(master); | 402 | ret = devm_spi_register_master(dev, master); |
403 | if (ret) | 403 | if (ret) |
404 | goto out_put_master; | 404 | goto out_put_master; |
405 | 405 | ||
@@ -418,8 +418,6 @@ static int bcm63xx_hsspi_remove(struct platform_device *pdev) | |||
418 | struct spi_master *master = platform_get_drvdata(pdev); | 418 | struct spi_master *master = platform_get_drvdata(pdev); |
419 | struct bcm63xx_hsspi *bs = spi_master_get_devdata(master); | 419 | struct bcm63xx_hsspi *bs = spi_master_get_devdata(master); |
420 | 420 | ||
421 | spi_unregister_master(master); | ||
422 | |||
423 | /* reset the hardware and block queue progress */ | 421 | /* reset the hardware and block queue progress */ |
424 | __raw_writel(0, bs->regs + HSSPI_INT_MASK_REG); | 422 | __raw_writel(0, bs->regs + HSSPI_INT_MASK_REG); |
425 | clk_disable_unprepare(bs->clk); | 423 | clk_disable_unprepare(bs->clk); |