summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-txx9.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-24 08:53:37 +0400
committerMark Brown <broonie@linaro.org>2013-09-26 14:43:10 +0400
commit2fe7e4add3e53df7c1b97e32076f8390dd81c6b3 (patch)
tree3b29ac99f97414a06d9965349f4f0ea635e83d26 /drivers/spi/spi-txx9.c
parent7388c03bac1b4466864945233abf3ca8ba1cb061 (diff)
downloadlinux-2fe7e4add3e53df7c1b97e32076f8390dd81c6b3.tar.xz
spi: txx9: 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>
Diffstat (limited to 'drivers/spi/spi-txx9.c')
-rw-r--r--drivers/spi/spi-txx9.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c
index 7c6d15766c72..69eb88627d40 100644
--- a/drivers/spi/spi-txx9.c
+++ b/drivers/spi/spi-txx9.c
@@ -406,7 +406,7 @@ static int txx9spi_probe(struct platform_device *dev)
master->num_chipselect = (u16)UINT_MAX; /* any GPIO numbers */
master->bits_per_word_mask = SPI_BPW_MASK(8) | SPI_BPW_MASK(16);
- ret = spi_register_master(master);
+ ret = devm_spi_register_master(&dev->dev, master);
if (ret)
goto exit;
return 0;
@@ -428,11 +428,9 @@ static int txx9spi_remove(struct platform_device *dev)
struct spi_master *master = spi_master_get(platform_get_drvdata(dev));
struct txx9spi *c = spi_master_get_devdata(master);
- spi_unregister_master(master);
destroy_workqueue(c->workqueue);
clk_disable(c->clk);
clk_put(c->clk);
- spi_master_put(master);
return 0;
}