Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226895
b: refs/heads/master
c: 2faa83e
h: refs/heads/master
i:
  226893: dc40615
  226891: a644964
  226887: 46c348a
  226879: d9ed187
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Dec 16, 2010
1 parent 925dab7 commit e235d1a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 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: 224acb1839f5fbb4ba85a440f6dd30dfb0e561b6
refs/heads/master: 2faa83e2a519abea1055d156ce1b42b8fa57e87b
26 changes: 14 additions & 12 deletions trunk/drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2413,6 +2413,9 @@ 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,12 +2430,10 @@ static int musb_suspend(struct device *dev)

musb_save_context(musb);

if (musb->clock) {
if (musb->set_clock)
musb->set_clock(musb->clock, 0);
else
clk_disable(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 @@ -2442,12 +2443,13 @@ 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) {
if (musb->set_clock)
musb->set_clock(musb->clock, 1);
else
clk_enable(musb->clock);
}
if (!musb->clock)
return 0;

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 e235d1a

Please sign in to comment.