Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44796
b: refs/heads/master
c: bfb7fb7
h: refs/heads/master
v: v3
  • Loading branch information
Wojtek Kaniewski authored and Greg Kroah-Hartman committed Dec 20, 2006
1 parent 8c3118f commit 0c41d18
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 943c441948581bd01ab196a4d32da88bfa0f13ce
refs/heads/master: bfb7fb79e913f60330037d1f302efee28d5f6770
10 changes: 8 additions & 2 deletions trunk/drivers/usb/gadget/at91_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,10 @@ static int at91_vbus_session(struct usb_gadget *gadget, int is_active)
// VDBG("vbus %s\n", is_active ? "on" : "off");
local_irq_save(flags);
udc->vbus = (is_active != 0);
pullup(udc, is_active);
if (udc->driver)
pullup(udc, is_active);
else
pullup(udc, 0);
local_irq_restore(flags);
return 0;
}
Expand Down Expand Up @@ -1241,7 +1244,10 @@ static void handle_setup(struct at91_udc *udc, struct at91_ep *ep, u32 csr)
#undef w_length

/* pass request up to the gadget driver */
status = udc->driver->setup(&udc->gadget, &pkt.r);
if (udc->driver)
status = udc->driver->setup(&udc->gadget, &pkt.r);
else
status = -ENODEV;
if (status < 0) {
stall:
VDBG("req %02x.%02x protocol STALL; stat %d\n",
Expand Down

0 comments on commit 0c41d18

Please sign in to comment.