Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127252
b: refs/heads/master
c: c48a515
h: refs/heads/master
v: v3
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Jan 7, 2009
1 parent 593007b commit bf8ed7c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 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: b6a49b8490fe6f22f0027a3f05eb498918f09303
refs/heads/master: c48a5155252fd9cba7bedc59e5f8a339a3454d58
8 changes: 6 additions & 2 deletions trunk/drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ static void musb_free(struct musb *musb)
musb_gadget_cleanup(musb);
#endif

if (musb->nIrq >= 0) {
if (musb->nIrq >= 0 && musb->irq_wake) {
disable_irq_wake(musb->nIrq);
free_irq(musb->nIrq, musb);
}
Expand Down Expand Up @@ -1993,8 +1993,12 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
}
musb->nIrq = nIrq;
/* FIXME this handles wakeup irqs wrong */
if (enable_irq_wake(nIrq) == 0)
if (enable_irq_wake(nIrq) == 0) {
musb->irq_wake = 1;
device_init_wakeup(dev, 1);
} else {
musb->irq_wake = 0;
}

pr_info("%s: USB %s mode controller at %p using %s, IRQ %d\n",
musb_driver_name,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/musb/musb_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ struct musb {
struct otg_transceiver xceiv;

int nIrq;
unsigned irq_wake:1;

struct musb_hw_ep endpoints[MUSB_C_NUM_EPS];
#define control_ep endpoints
Expand Down

0 comments on commit bf8ed7c

Please sign in to comment.