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

index 6601b0fc097a0190b40fc3e7f9e8c725d15cd59c..be788572014b2fa75ef31b51c6460da72e313bde 100644 (file)
@@ -2334,10 +2334,10 @@ static int fsl_qe_stop(struct usb_gadget *gadget,
                nuke(loop_ep, -ESHUTDOWN);
        spin_unlock_irqrestore(&udc->lock, flags);
 
+       dev_info(udc->dev, "unregistered gadget driver '%s'\r\n",
+                       udc->driver->driver.name);
        udc->driver = NULL;
 
-       dev_info(udc->dev, "unregistered gadget driver '%s'\r\n",
-                       driver->driver.name);
        return 0;
 }