Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221923
b: refs/heads/master
c: 32d5dc9
h: refs/heads/master
i:
  221921: 55830d1
  221919: 20ae429
v: v3
  • Loading branch information
Bob Liu authored and Felipe Balbi committed Nov 5, 2010
1 parent 466f828 commit a9001f5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d726f5add3af537952f7c35fdaebab43b718c2d
refs/heads/master: 32d5dc9520f0c6f60f691dd478741c774e292406
26 changes: 12 additions & 14 deletions trunk/drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2410,9 +2410,6 @@ static int musb_suspend(struct device *dev)
unsigned long flags;
struct musb *musb = dev_to_musb(&pdev->dev);

if (!musb->clock)
return 0;

spin_lock_irqsave(&musb->lock, flags);

if (is_peripheral_active(musb)) {
Expand All @@ -2427,10 +2424,12 @@ static int musb_suspend(struct device *dev)

musb_save_context(musb);

if (musb->set_clock)
musb->set_clock(musb->clock, 0);
else
clk_disable(musb->clock);
if (musb->clock) {
if (musb->set_clock)
musb->set_clock(musb->clock, 0);
else
clk_disable(musb->clock);
}
spin_unlock_irqrestore(&musb->lock, flags);
return 0;
}
Expand All @@ -2440,13 +2439,12 @@ static int musb_resume_noirq(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct musb *musb = dev_to_musb(&pdev->dev);

if (!musb->clock)
return 0;

if (musb->set_clock)
musb->set_clock(musb->clock, 1);
else
clk_enable(musb->clock);
if (musb->clock) {
if (musb->set_clock)
musb->set_clock(musb->clock, 1);
else
clk_enable(musb->clock);
}

musb_restore_context(musb);

Expand Down

0 comments on commit a9001f5

Please sign in to comment.