提交 84749c6d 编写于 作者: S Sachin Kamat 提交者: Felipe Balbi

usb: gadget: s3c-hsotg: Use devm_clk_get function

devm_* functions are already used in this file. Hence
convert clk_get to devm_clk_get for completeness.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 dc2cdcaf
...@@ -3516,7 +3516,7 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev) ...@@ -3516,7 +3516,7 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
hsotg->dev = dev; hsotg->dev = dev;
hsotg->plat = plat; hsotg->plat = plat;
hsotg->clk = clk_get(&pdev->dev, "otg"); hsotg->clk = devm_clk_get(&pdev->dev, "otg");
if (IS_ERR(hsotg->clk)) { if (IS_ERR(hsotg->clk)) {
dev_err(dev, "cannot get otg clock\n"); dev_err(dev, "cannot get otg clock\n");
return PTR_ERR(hsotg->clk); return PTR_ERR(hsotg->clk);
...@@ -3664,7 +3664,6 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev) ...@@ -3664,7 +3664,6 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
err_clk: err_clk:
clk_disable_unprepare(hsotg->clk); clk_disable_unprepare(hsotg->clk);
clk_put(hsotg->clk);
return ret; return ret;
} }
...@@ -3690,7 +3689,6 @@ static int __devexit s3c_hsotg_remove(struct platform_device *pdev) ...@@ -3690,7 +3689,6 @@ static int __devexit s3c_hsotg_remove(struct platform_device *pdev)
regulator_bulk_free(ARRAY_SIZE(hsotg->supplies), hsotg->supplies); regulator_bulk_free(ARRAY_SIZE(hsotg->supplies), hsotg->supplies);
clk_disable_unprepare(hsotg->clk); clk_disable_unprepare(hsotg->clk);
clk_put(hsotg->clk);
device_unregister(&hsotg->gadget.dev); device_unregister(&hsotg->gadget.dev);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册