提交 7430e77e 编写于 作者: R Russell King 提交者: Chris Ball

mmc: sdhci-dove: use devm_clk_get()

Use devm_clk_get() rather than clk_get() to make cleanup paths more simple.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 a4071fbb
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册