diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2014-06-29 10:01:10 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-06-30 13:53:38 -0400 |
commit | e176475daa9a0b99d7e01bcfa24c7800400a9cdc (patch) | |
tree | 8eee8684151b1cf6c7eb44d8b73015d07600442b /drivers/usb | |
parent | aa491320f4fb00f4ff6b67790bc75a96f6eb7790 (diff) |
usb: gadget: pxa27x_udc: prepare and unprepare the clock
Add clock prepare and unprepare as required by clock framework.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/pxa27x_udc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index cdf4d678be96..597d39f89420 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
@@ -2446,6 +2446,9 @@ static int pxa_udc_probe(struct platform_device *pdev) | |||
2446 | retval = PTR_ERR(udc->clk); | 2446 | retval = PTR_ERR(udc->clk); |
2447 | goto err_clk; | 2447 | goto err_clk; |
2448 | } | 2448 | } |
2449 | retval = clk_prepare(udc->clk); | ||
2450 | if (retval) | ||
2451 | goto err_clk_prepare; | ||
2449 | 2452 | ||
2450 | retval = -ENOMEM; | 2453 | retval = -ENOMEM; |
2451 | udc->regs = ioremap(regs->start, resource_size(regs)); | 2454 | udc->regs = ioremap(regs->start, resource_size(regs)); |
@@ -2483,6 +2486,8 @@ err_add_udc: | |||
2483 | err_irq: | 2486 | err_irq: |
2484 | iounmap(udc->regs); | 2487 | iounmap(udc->regs); |
2485 | err_map: | 2488 | err_map: |
2489 | clk_unprepare(udc->clk); | ||
2490 | err_clk_prepare: | ||
2486 | clk_put(udc->clk); | 2491 | clk_put(udc->clk); |
2487 | udc->clk = NULL; | 2492 | udc->clk = NULL; |
2488 | err_clk: | 2493 | err_clk: |
@@ -2509,6 +2514,7 @@ static int pxa_udc_remove(struct platform_device *_dev) | |||
2509 | 2514 | ||
2510 | udc->transceiver = NULL; | 2515 | udc->transceiver = NULL; |
2511 | the_controller = NULL; | 2516 | the_controller = NULL; |
2517 | clk_unprepare(udc->clk); | ||
2512 | clk_put(udc->clk); | 2518 | clk_put(udc->clk); |
2513 | iounmap(udc->regs); | 2519 | iounmap(udc->regs); |
2514 | 2520 | ||