diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-08-20 16:12:47 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-08-31 12:41:39 +0300 |
commit | d0d860758bd350206242962a223858bd01cd8a93 (patch) | |
tree | e1333e8594bd0857bb51a87da655287836bab101 /drivers/usb/gadget/dummy_hcd.c | |
parent | c4846a1807fc6138e2f010d65757feb4b7b0c2cf (diff) |
usb: gadget: dummy-hcd: remember to update driver pointer
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>
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index b799106027ad..91916f693ff7 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -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; @@ -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; |