summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-mpc512x-psc.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-25 09:51:21 +0100
committerMark Brown <broonie@linaro.org>2013-10-25 09:51:21 +0100
commit52d85ebb7b639448e596a8577bf981f5b139f4fd (patch)
tree7632999ecf194b9863ad4a86533a91b9f78a28ce /drivers/spi/spi-mpc512x-psc.c
parent2ef2e60d2f4d470b0cb591baeaf942316c0673ed (diff)
parentdb9371b853e7cebce93f0775215ef297b8d0bf93 (diff)
Merge remote-tracking branch 'spi/topic/bfin' into spi-next
Diffstat (limited to 'drivers/spi/spi-mpc512x-psc.c')
-rw-r--r--drivers/spi/spi-mpc512x-psc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c
index 6adf4e35816d..ee6e61cbf7f5 100644
--- a/drivers/spi/spi-mpc512x-psc.c
+++ b/drivers/spi/spi-mpc512x-psc.c
@@ -536,7 +536,7 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
if (ret < 0)
goto free_clock;
- ret = spi_register_master(master);
+ ret = devm_spi_register_master(dev, master);
if (ret < 0)
goto free_clock;
@@ -559,12 +559,10 @@ static int mpc512x_psc_spi_do_remove(struct device *dev)
struct spi_master *master = spi_master_get(dev_get_drvdata(dev));
struct mpc512x_psc_spi *mps = spi_master_get_devdata(master);
- spi_unregister_master(master);
clk_disable_unprepare(mps->clk_mclk);
free_irq(mps->irq, mps);
if (mps->psc)
iounmap(mps->psc);
- spi_master_put(master);
return 0;
}