aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
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 8fd50a211037..4233fd98e3aa 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)
92 return -ENOMEM; 92 return -ENOMEM;
93 } 93 }
94 94
95 priv->clk = clk_get(&pdev->dev, NULL); 95 priv->clk = devm_clk_get(&pdev->dev, NULL);
96 if (!IS_ERR(priv->clk)) 96 if (!IS_ERR(priv->clk))
97 clk_prepare_enable(priv->clk); 97 clk_prepare_enable(priv->clk);
98 98
@@ -107,10 +107,8 @@ static int __devinit sdhci_dove_probe(struct platform_device *pdev)
107 return 0; 107 return 0;
108 108
109sdhci_dove_register_fail: 109sdhci_dove_register_fail:
110 if (!IS_ERR(priv->clk)) { 110 if (!IS_ERR(priv->clk))
111 clk_disable_unprepare(priv->clk); 111 clk_disable_unprepare(priv->clk);
112 clk_put(priv->clk);
113 }
114 return ret; 112 return ret;
115} 113}
116 114
@@ -122,10 +120,9 @@ static int __devexit sdhci_dove_remove(struct platform_device *pdev)
122 120
123 sdhci_pltfm_unregister(pdev); 121 sdhci_pltfm_unregister(pdev);
124 122
125 if (!IS_ERR(priv->clk)) { 123 if (!IS_ERR(priv->clk))
126 clk_disable_unprepare(priv->clk); 124 clk_disable_unprepare(priv->clk);
127 clk_put(priv->clk); 125
128 }
129 return 0; 126 return 0;
130} 127}
131 128