Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287029
b: refs/heads/master
c: 37fd371
h: refs/heads/master
i:
  287027: 759e823
v: v3
  • Loading branch information
Alexander Shishkin authored and Felipe Balbi committed Jan 24, 2012
1 parent 6824b2a commit 849d71d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28bd6222544d7559edf9ff487172e45ce46e2578
refs/heads/master: 37fd37108449d574da11aa9055c5c8afb39ff226
18 changes: 8 additions & 10 deletions trunk/drivers/usb/gadget/langwell_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1517,8 +1517,7 @@ static void langwell_udc_stop(struct langwell_udc *dev)


/* stop all USB activities */
static void stop_activity(struct langwell_udc *dev,
struct usb_gadget_driver *driver)
static void stop_activity(struct langwell_udc *dev)
{
struct langwell_ep *ep;
dev_dbg(&dev->pdev->dev, "---> %s()\n", __func__);
Expand All @@ -1530,9 +1529,9 @@ static void stop_activity(struct langwell_udc *dev,
}

/* report disconnect; the driver is already quiesced */
if (driver) {
if (dev->driver) {
spin_unlock(&dev->lock);
driver->disconnect(&dev->gadget);
dev->driver->disconnect(&dev->gadget);
spin_lock(&dev->lock);
}

Expand Down Expand Up @@ -1920,11 +1919,10 @@ static int langwell_stop(struct usb_gadget *g,

/* stop all usb activities */
dev->gadget.speed = USB_SPEED_UNKNOWN;
stop_activity(dev, driver);
spin_unlock_irqrestore(&dev->lock, flags);

dev->gadget.dev.driver = NULL;
dev->driver = NULL;
stop_activity(dev);
spin_unlock_irqrestore(&dev->lock, flags);

device_remove_file(&dev->pdev->dev, &dev_attr_function);

Expand Down Expand Up @@ -2724,15 +2722,15 @@ static void handle_usb_reset(struct langwell_udc *dev)
dev->bus_reset = 1;

/* reset all the queues, stop all USB activities */
stop_activity(dev, dev->driver);
stop_activity(dev);
dev->usb_state = USB_STATE_DEFAULT;
} else {
dev_vdbg(&dev->pdev->dev, "device controller reset\n");
/* controller reset */
langwell_udc_reset(dev);

/* reset all the queues, stop all USB activities */
stop_activity(dev, dev->driver);
stop_activity(dev);

/* reset ep0 dQH and endptctrl */
ep0_reset(dev);
Expand Down Expand Up @@ -3290,7 +3288,7 @@ static int langwell_udc_suspend(struct pci_dev *pdev, pm_message_t state)

spin_lock_irq(&dev->lock);
/* stop all usb activities */
stop_activity(dev, dev->driver);
stop_activity(dev);
spin_unlock_irq(&dev->lock);

/* free dTD dma_pool and dQH */
Expand Down

0 comments on commit 849d71d

Please sign in to comment.