Commit bfd0ed57 authored by Felipe Balbi's avatar Felipe Balbi

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: default avatarFelipe Balbi <balbi@ti.com>
parent 5baca5cf
...@@ -2446,11 +2446,9 @@ static int net2280_stop(struct usb_gadget *_gadget, ...@@ -2446,11 +2446,9 @@ static int net2280_stop(struct usb_gadget *_gadget,
dev = container_of(_gadget, struct net2280, gadget); dev = container_of(_gadget, struct net2280, gadget);
spin_lock_irqsave(&dev->lock, flags); spin_lock_irqsave(&dev->lock, flags);
stop_activity(dev, driver); stop_activity(dev, NULL);
spin_unlock_irqrestore(&dev->lock, flags); spin_unlock_irqrestore(&dev->lock, flags);
dev->driver = NULL;
net2280_led_active(dev, 0); net2280_led_active(dev, 0);
/* Disable full-speed test mode */ /* Disable full-speed test mode */
...@@ -2460,8 +2458,8 @@ static int net2280_stop(struct usb_gadget *_gadget, ...@@ -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_function);
device_remove_file(&dev->pdev->dev, &dev_attr_queues); device_remove_file(&dev->pdev->dev, &dev_attr_queues);
ep_dbg(dev, "unregistered driver '%s'\n", ep_dbg(dev, "unregistered driver '%s'\n", dev->driver->driver.name);
driver ? driver->driver.name : ""); dev->driver = NULL;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment