diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-24 13:31:50 +0900 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-26 11:42:33 +0100 |
commit | eaa24297846bcdd98cefd52937ed88046a121ebc (patch) | |
tree | 4a34108d170597c3d28e1bcd24f5f4113dfafd87 | |
parent | 434eaf3b231125c73450bbc6ebe2396b9b63aa2f (diff) | |
download | linux-eaa24297846bcdd98cefd52937ed88046a121ebc.tar.bz2 |
spi: mpc512x: use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler,
and remove a duplicate put.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/spi/spi-mpc512x-psc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c index dbc5e999a1f5..b4426dd8a0c3 100644 --- a/drivers/spi/spi-mpc512x-psc.c +++ b/drivers/spi/spi-mpc512x-psc.c @@ -534,7 +534,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; @@ -557,12 +557,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; } |