提交 e176475d 编写于 作者: R Robert Jarzmik 提交者: Felipe Balbi

usb: gadget: pxa27x_udc: prepare and unprepare the clock

Add clock prepare and unprepare as required by clock framework.
Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 aa491320
......@@ -2446,6 +2446,9 @@ static int pxa_udc_probe(struct platform_device *pdev)
retval = PTR_ERR(udc->clk);
goto err_clk;
}
retval = clk_prepare(udc->clk);
if (retval)
goto err_clk_prepare;
retval = -ENOMEM;
udc->regs = ioremap(regs->start, resource_size(regs));
......@@ -2483,6 +2486,8 @@ static int pxa_udc_probe(struct platform_device *pdev)
err_irq:
iounmap(udc->regs);
err_map:
clk_unprepare(udc->clk);
err_clk_prepare:
clk_put(udc->clk);
udc->clk = NULL;
err_clk:
......@@ -2509,6 +2514,7 @@ static int pxa_udc_remove(struct platform_device *_dev)
udc->transceiver = NULL;
the_controller = NULL;
clk_unprepare(udc->clk);
clk_put(udc->clk);
iounmap(udc->regs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册