diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-12-16 13:04:17 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-12-16 13:04:17 -0500 |
commit | 2faa83e2a519abea1055d156ce1b42b8fa57e87b (patch) | |
tree | 8aaca988b9b62dcdaa0ace8e70b11fbc13d8ef2d /drivers/usb/musb | |
parent | 224acb1839f5fbb4ba85a440f6dd30dfb0e561b6 (diff) |
Revert "USB: musb: pm: don't rely fully on clock support"
This reverts commit 32d5dc9520f0c6f60f691dd478741c774e292406.
Needed to properly merge the musb changes that are in the
usb-next branch into Linus's tree.
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 99beebce8550..365a4fab5c64 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -2413,6 +2413,9 @@ static int musb_suspend(struct device *dev) | |||
2413 | unsigned long flags; | 2413 | unsigned long flags; |
2414 | struct musb *musb = dev_to_musb(&pdev->dev); | 2414 | struct musb *musb = dev_to_musb(&pdev->dev); |
2415 | 2415 | ||
2416 | if (!musb->clock) | ||
2417 | return 0; | ||
2418 | |||
2416 | spin_lock_irqsave(&musb->lock, flags); | 2419 | spin_lock_irqsave(&musb->lock, flags); |
2417 | 2420 | ||
2418 | if (is_peripheral_active(musb)) { | 2421 | if (is_peripheral_active(musb)) { |
@@ -2427,12 +2430,10 @@ static int musb_suspend(struct device *dev) | |||
2427 | 2430 | ||
2428 | musb_save_context(musb); | 2431 | musb_save_context(musb); |
2429 | 2432 | ||
2430 | if (musb->clock) { | 2433 | if (musb->set_clock) |
2431 | if (musb->set_clock) | 2434 | musb->set_clock(musb->clock, 0); |
2432 | musb->set_clock(musb->clock, 0); | 2435 | else |
2433 | else | 2436 | clk_disable(musb->clock); |
2434 | clk_disable(musb->clock); | ||
2435 | } | ||
2436 | spin_unlock_irqrestore(&musb->lock, flags); | 2437 | spin_unlock_irqrestore(&musb->lock, flags); |
2437 | return 0; | 2438 | return 0; |
2438 | } | 2439 | } |
@@ -2442,12 +2443,13 @@ static int musb_resume_noirq(struct device *dev) | |||
2442 | struct platform_device *pdev = to_platform_device(dev); | 2443 | struct platform_device *pdev = to_platform_device(dev); |
2443 | struct musb *musb = dev_to_musb(&pdev->dev); | 2444 | struct musb *musb = dev_to_musb(&pdev->dev); |
2444 | 2445 | ||
2445 | if (musb->clock) { | 2446 | if (!musb->clock) |
2446 | if (musb->set_clock) | 2447 | return 0; |
2447 | musb->set_clock(musb->clock, 1); | 2448 | |
2448 | else | 2449 | if (musb->set_clock) |
2449 | clk_enable(musb->clock); | 2450 | musb->set_clock(musb->clock, 1); |
2450 | } | 2451 | else |
2452 | clk_enable(musb->clock); | ||
2451 | 2453 | ||
2452 | musb_restore_context(musb); | 2454 | musb_restore_context(musb); |
2453 | 2455 | ||