summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-11-22 23:55:10 +0000
committerChris Ball <cjb@laptop.org>2012-12-06 13:55:13 -0500
commit7430e77e64000133c50cbd287d44733b4f487dc5 (patch)
tree080508f0f9f987afc8458ca2ab5307f2871d36eb /drivers/mmc
parenta4071fbbb9edbc5a24985b2f64ed45f35b90dbeb (diff)
downloadlinux-3.10-7430e77e64000133c50cbd287d44733b4f487dc5.tar.gz
linux-3.10-7430e77e64000133c50cbd287d44733b4f487dc5.tar.bz2
linux-3.10-7430e77e64000133c50cbd287d44733b4f487dc5.zip
mmc: sdhci-dove: use devm_clk_get()
Use devm_clk_get() rather than clk_get() to make cleanup paths more simple. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci-dove.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
index 8fd50a21103..4233fd98e3a 100644
--- a/drivers/mmc/host/sdhci-dove.c
+++ b/drivers/mmc/host/sdhci-dove.c
@@ -92,7 +92,7 @@ static int __devinit sdhci_dove_probe(struct platform_device *pdev)
return -ENOMEM;
}
- priv->clk = clk_get(&pdev->dev, NULL);
+ priv->clk = devm_clk_get(&pdev->dev, NULL);
if (!IS_ERR(priv->clk))
clk_prepare_enable(priv->clk);
@@ -107,10 +107,8 @@ static int __devinit sdhci_dove_probe(struct platform_device *pdev)
return 0;
sdhci_dove_register_fail:
- if (!IS_ERR(priv->clk)) {
+ if (!IS_ERR(priv->clk))
clk_disable_unprepare(priv->clk);
- clk_put(priv->clk);
- }
return ret;
}
@@ -122,10 +120,9 @@ static int __devexit sdhci_dove_remove(struct platform_device *pdev)
sdhci_pltfm_unregister(pdev);
- if (!IS_ERR(priv->clk)) {
+ if (!IS_ERR(priv->clk))
clk_disable_unprepare(priv->clk);
- clk_put(priv->clk);
- }
+
return 0;
}