diff options
author | Felipe Balbi <balbi@ti.com> | 2014-10-17 20:23:33 +0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-03 19:01:10 +0300 |
commit | bfd0ed576dbf9cc71af7dbe42841fc9246524961 (patch) | |
tree | d061844e6f12b5d6eaf0b7f914c203f350993680 | |
parent | 5baca5cf255d9a9d2bc97fe2531e12e37ebdd77d (diff) | |
download | linux-bfd0ed576dbf9cc71af7dbe42841fc9246524961.tar.xz |
usb: gadget: udc: net2280: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/udc/net2280.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c index 8d13337e2dde..ee74b9dfb757 100644 --- a/drivers/usb/gadget/udc/net2280.c +++ b/drivers/usb/gadget/udc/net2280.c @@ -2446,11 +2446,9 @@ static int net2280_stop(struct usb_gadget *_gadget, dev = container_of(_gadget, struct net2280, gadget); spin_lock_irqsave(&dev->lock, flags); - stop_activity(dev, driver); + stop_activity(dev, NULL); spin_unlock_irqrestore(&dev->lock, flags); - dev->driver = NULL; - net2280_led_active(dev, 0); /* Disable full-speed test mode */ @@ -2460,8 +2458,8 @@ static int net2280_stop(struct usb_gadget *_gadget, device_remove_file(&dev->pdev->dev, &dev_attr_function); device_remove_file(&dev->pdev->dev, &dev_attr_queues); - ep_dbg(dev, "unregistered driver '%s'\n", - driver ? driver->driver.name : ""); + ep_dbg(dev, "unregistered driver '%s'\n", dev->driver->driver.name); + dev->driver = NULL; return 0; } |