aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/s3c-hsotg.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-09-03 06:45:18 -0400
committerFelipe Balbi <balbi@ti.com>2012-09-03 10:09:40 -0400
commit84749c6dcb694a7aa793221ea8cc3d70bd46d466 (patch)
treea43703dc35dfa45a35e391644e9fa5b4f2b58931 /drivers/usb/gadget/s3c-hsotg.c
parentdc2cdcaf4caafeb069d01704fdfda24f9c1f443a (diff)
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: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/s3c-hsotg.c')
-rw-r--r--drivers/usb/gadget/s3c-hsotg.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index a826cb98d306..5b90a3c159e6 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -3516,7 +3516,7 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
3516 hsotg->dev = dev; 3516 hsotg->dev = dev;
3517 hsotg->plat = plat; 3517 hsotg->plat = plat;
3518 3518
3519 hsotg->clk = clk_get(&pdev->dev, "otg"); 3519 hsotg->clk = devm_clk_get(&pdev->dev, "otg");
3520 if (IS_ERR(hsotg->clk)) { 3520 if (IS_ERR(hsotg->clk)) {
3521 dev_err(dev, "cannot get otg clock\n"); 3521 dev_err(dev, "cannot get otg clock\n");
3522 return PTR_ERR(hsotg->clk); 3522 return PTR_ERR(hsotg->clk);
@@ -3664,7 +3664,6 @@ err_supplies:
3664 3664
3665err_clk: 3665err_clk:
3666 clk_disable_unprepare(hsotg->clk); 3666 clk_disable_unprepare(hsotg->clk);
3667 clk_put(hsotg->clk);
3668 3667
3669 return ret; 3668 return ret;
3670} 3669}
@@ -3690,7 +3689,6 @@ static int __devexit s3c_hsotg_remove(struct platform_device *pdev)
3690 regulator_bulk_free(ARRAY_SIZE(hsotg->supplies), hsotg->supplies); 3689 regulator_bulk_free(ARRAY_SIZE(hsotg->supplies), hsotg->supplies);
3691 3690
3692 clk_disable_unprepare(hsotg->clk); 3691 clk_disable_unprepare(hsotg->clk);
3693 clk_put(hsotg->clk);
3694 3692
3695 device_unregister(&hsotg->gadget.dev); 3693 device_unregister(&hsotg->gadget.dev);
3696 return 0; 3694 return 0;