usb: gadget: udc: net2280: do not rely on 'driver' argument
authorFelipe Balbi <balbi@ti.com>
Fri, 17 Oct 2014 16:23:33 +0000 (11:23 -0500)
committerFelipe Balbi <balbi@ti.com>
Mon, 3 Nov 2014 16:01:10 +0000 (10:01 -0600)
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>
drivers/usb/gadget/udc/net2280.c

index 8d13337e2dde050fa3bcbc489f32b831c899c94a..ee74b9dfb757a0e7b408a8797608ff5b4165d992 100644 (file)
@@ -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;
 }
This page took 0.026547 seconds and 5 git commands to generate.