Commit 4fbc5566 authored by Michal Nazarewicz's avatar Michal Nazarewicz Committed by Felipe Balbi

usb: gadget: goku: remove unused argument

The stop_activity function never uses driver argument (even
though it modifies it) and thus it is safe to remove it.
Signed-off-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent c3505f04
...@@ -1350,16 +1350,12 @@ static int goku_udc_start(struct usb_gadget *g, ...@@ -1350,16 +1350,12 @@ static int goku_udc_start(struct usb_gadget *g,
return 0; return 0;
} }
static void static void stop_activity(struct goku_udc *dev)
stop_activity(struct goku_udc *dev, struct usb_gadget_driver *driver)
{ {
unsigned i; unsigned i;
DBG (dev, "%s\n", __func__); DBG (dev, "%s\n", __func__);
if (dev->gadget.speed == USB_SPEED_UNKNOWN)
driver = NULL;
/* disconnect gadget driver after quiesceing hw and the driver */ /* disconnect gadget driver after quiesceing hw and the driver */
udc_reset (dev); udc_reset (dev);
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
...@@ -1377,7 +1373,7 @@ static int goku_udc_stop(struct usb_gadget *g, ...@@ -1377,7 +1373,7 @@ static int goku_udc_stop(struct usb_gadget *g,
spin_lock_irqsave(&dev->lock, flags); spin_lock_irqsave(&dev->lock, flags);
dev->driver = NULL; dev->driver = NULL;
stop_activity(dev, driver); stop_activity(dev);
spin_unlock_irqrestore(&dev->lock, flags); spin_unlock_irqrestore(&dev->lock, flags);
return 0; return 0;
...@@ -1521,7 +1517,7 @@ static irqreturn_t goku_irq(int irq, void *_dev) ...@@ -1521,7 +1517,7 @@ static irqreturn_t goku_irq(int irq, void *_dev)
if (unlikely(stat & INT_DEVWIDE)) { if (unlikely(stat & INT_DEVWIDE)) {
if (stat & INT_SYSERROR) { if (stat & INT_SYSERROR) {
ERROR(dev, "system error\n"); ERROR(dev, "system error\n");
stop_activity(dev, dev->driver); stop_activity(dev);
stat = 0; stat = 0;
handled = 1; handled = 1;
// FIXME have a neater way to prevent re-enumeration // FIXME have a neater way to prevent re-enumeration
...@@ -1536,7 +1532,7 @@ static irqreturn_t goku_irq(int irq, void *_dev) ...@@ -1536,7 +1532,7 @@ static irqreturn_t goku_irq(int irq, void *_dev)
} else { } else {
DBG(dev, "disconnect\n"); DBG(dev, "disconnect\n");
if (dev->gadget.speed == USB_SPEED_FULL) if (dev->gadget.speed == USB_SPEED_FULL)
stop_activity(dev, dev->driver); stop_activity(dev);
dev->ep0state = EP0_DISCONNECT; dev->ep0state = EP0_DISCONNECT;
dev->int_enable = INT_DEVWIDE; dev->int_enable = INT_DEVWIDE;
writel(dev->int_enable, &dev->regs->int_enable); writel(dev->int_enable, &dev->regs->int_enable);
......
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