summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-omap-100k.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-07-10 19:07:51 +0400
committerMark Brown <broonie@linaro.org>2013-07-15 14:39:30 +0400
commit022a9412ec056026739c15df90e947b67d1b8222 (patch)
tree3b4d275f538878527059e186ef7e40d0384e72f6 /drivers/spi/spi-omap-100k.c
parentda60b85506861b71db345f93bae72cbd8b51dcdd (diff)
downloadlinux-022a9412ec056026739c15df90e947b67d1b8222.tar.xz
spi/omap-100k: Convert to devm_clk_get()
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-omap-100k.c')
-rw-r--r--drivers/spi/spi-omap-100k.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c
index d4fcca9dc8e5..691ef3f199ff 100644
--- a/drivers/spi/spi-omap-100k.c
+++ b/drivers/spi/spi-omap-100k.c
@@ -443,33 +443,29 @@ static int omap1_spi100k_probe(struct platform_device *pdev)
*/
spi100k->base = (void __iomem *) pdev->dev.platform_data;
- spi100k->ick = clk_get(&pdev->dev, "ick");
+ spi100k->ick = devm_clk_get(&pdev->dev, "ick");
if (IS_ERR(spi100k->ick)) {
dev_dbg(&pdev->dev, "can't get spi100k_ick\n");
status = PTR_ERR(spi100k->ick);
- goto err1;
+ goto err;
}
- spi100k->fck = clk_get(&pdev->dev, "fck");
+ spi100k->fck = devm_clk_get(&pdev->dev, "fck");
if (IS_ERR(spi100k->fck)) {
dev_dbg(&pdev->dev, "can't get spi100k_fck\n");
status = PTR_ERR(spi100k->fck);
- goto err2;
+ goto err;
}
status = spi_register_master(master);
if (status < 0)
- goto err3;
+ goto err;
spi100k->state = SPI_RUNNING;
return status;
-err3:
- clk_put(spi100k->fck);
-err2:
- clk_put(spi100k->ick);
-err1:
+err:
spi_master_put(master);
return status;
}
@@ -487,9 +483,6 @@ static int omap1_spi100k_remove(struct platform_device *pdev)
if (status != 0)
return status;
- clk_put(spi100k->fck);
- clk_put(spi100k->ick);
-
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
spi_unregister_master(master);