diff options
author | Felipe Balbi <balbi@ti.com> | 2014-10-17 12:05:12 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-03 10:01:16 -0600 |
commit | 22835b807e7ca946a4d1fbd4c7af56aa09cd273e (patch) | |
tree | 2b96d92ea6dbaadf7880c9729e5bfb3cb3265978 /drivers/usb/gadget/udc/amd5536udc.c | |
parent | 8da9fe8af8e3fd953b346c800976a5db6c0115a4 (diff) |
usb: gadget: remove unnecessary 'driver' argument
now that no UDC driver relies on the extra
'driver' argument to ->udc_stop(), we can
safely remove it.
This commit is based on previous work by
Robert Baldyga <r.baldyga@samsung.com> which
can be found at [1]; however that patch turned
out to have a high probability of regressing
many UDC drivers because of a blind search & replace
s/driver/$udc->driver/ which caused the 'driver'
argument to stop_activity() to be a valid non-NULL
pointer when it should be NULL, thus causing UDCs
to mistakenly call gadget driver's ->disconnect()
callback.
[1] http://markmail.org/message/x5zneg4xea4zntab
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc/amd5536udc.c')
-rw-r--r-- | drivers/usb/gadget/udc/amd5536udc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c index 7d0e0b8a9606..606b9009861a 100644 --- a/drivers/usb/gadget/udc/amd5536udc.c +++ b/drivers/usb/gadget/udc/amd5536udc.c @@ -1401,9 +1401,8 @@ static int udc_wakeup(struct usb_gadget *gadget) static int amd5536_udc_start(struct usb_gadget *g, struct usb_gadget_driver *driver); -static int amd5536_udc_stop(struct usb_gadget *g, - struct usb_gadget_driver *driver); -/* gadget operations */ +static int amd5536_udc_stop(struct usb_gadget *g); + static const struct usb_gadget_ops udc_ops = { .wakeup = udc_wakeup, .get_frame = udc_get_frame, @@ -1962,8 +1961,7 @@ __acquires(dev->lock) } /* Called by gadget driver to unregister itself */ -static int amd5536_udc_stop(struct usb_gadget *g, - struct usb_gadget_driver *driver) +static int amd5536_udc_stop(struct usb_gadget *g) { struct udc *dev = to_amd5536_udc(g); unsigned long flags; |