diff options
Diffstat (limited to 'drivers/usb/gadget/at91_udc.c')
-rw-r--r-- | drivers/usb/gadget/at91_udc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index 12ac9cd32a07..df1bae9b048e 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c | |||
@@ -1370,6 +1370,12 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc) | |||
1370 | { | 1370 | { |
1371 | struct at91_udc *udc = _udc; | 1371 | struct at91_udc *udc = _udc; |
1372 | u32 rescans = 5; | 1372 | u32 rescans = 5; |
1373 | int disable_clock = 0; | ||
1374 | |||
1375 | if (!udc->clocked) { | ||
1376 | clk_on(udc); | ||
1377 | disable_clock = 1; | ||
1378 | } | ||
1373 | 1379 | ||
1374 | while (rescans--) { | 1380 | while (rescans--) { |
1375 | u32 status; | 1381 | u32 status; |
@@ -1458,6 +1464,9 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc) | |||
1458 | } | 1464 | } |
1459 | } | 1465 | } |
1460 | 1466 | ||
1467 | if (disable_clock) | ||
1468 | clk_off(udc); | ||
1469 | |||
1461 | return IRQ_HANDLED; | 1470 | return IRQ_HANDLED; |
1462 | } | 1471 | } |
1463 | 1472 | ||