USB: net2280: Remove ->disconnect() callback from net2280_pullup()
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 2 Oct 2018 14:18:40 +0000 (10:18 -0400)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 5 Oct 2018 07:50:23 +0000 (10:50 +0300)
The net2280 UDC driver invokes the gadget driver's ->disconnect()
callback routine when the net2280_pullup() routine turns off the D+
pullup.  This is now unnecessary, because the gadget core performs the
callback on our behalf.  This patch removes the unneeded callback.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/net2280.c

index b02ab2a8d927f6f76fb3173113b83dbd6555363a..e7dae5379e0416a0d46270636904e3cfe892887d 100644 (file)
@@ -1550,9 +1550,6 @@ static int net2280_pullup(struct usb_gadget *_gadget, int is_on)
 
        spin_unlock_irqrestore(&dev->lock, flags);
 
-       if (!is_on && dev->driver)
-               dev->driver->disconnect(&dev->gadget);
-
        return 0;
 }