Skip to content

Commit

Permalink
usb: gadget: dummy-hcd: remember to update driver pointer
Browse files Browse the repository at this point in the history
This patch (as1599) fixes dummy-hcd to make it update the appropriate
driver pointer when a new gadget driver is bound or unbound.  Without
this change, the gadget driver's name doesn't appear in dev_printk
output.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Alan Stern authored and Felipe Balbi committed Aug 31, 2012
1 parent c4846a1 commit d0d8607
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/gadget/dummy_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ static int dummy_udc_start(struct usb_gadget *g,
dum->devstatus = 0;

dum->driver = driver;
dum->gadget.dev.driver = &driver->driver;
dev_dbg(udc_dev(dum), "binding gadget driver '%s'\n",
driver->driver.name);
return 0;
Expand All @@ -923,6 +924,7 @@ static int dummy_udc_stop(struct usb_gadget *g,
dev_dbg(udc_dev(dum), "unregister gadget driver '%s'\n",
driver->driver.name);

dum->gadget.dev.driver = NULL;
dum->driver = NULL;

return 0;
Expand Down

0 comments on commit d0d8607

Please sign in to comment.