~ubuntu-branches/ubuntu/wily/linux-ti-omap4/wily

« back to all changes in this revision

Viewing changes to drivers/usb/dwc3/gadget.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2013-07-11 18:35:20 UTC
  • Revision ID: package-import@ubuntu.com-20130711183520-htnf1x4y5r11hndr
Tags: 3.5.0-229.42
* Release Tracking Bug
  - LP: #1199276

[ Paolo Pisati ]

* [Config] CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set

Show diffs side-by-side

added added

removed removed

Lines of Context:
1537
1537
 
1538
1538
        for (epnum = 0; epnum < DWC3_ENDPOINTS_NUM; epnum++) {
1539
1539
                dep = dwc->eps[epnum];
1540
 
                dwc3_free_trb_pool(dep);
1541
 
 
1542
 
                if (epnum != 0 && epnum != 1)
 
1540
                /*
 
1541
                 * Physical endpoints 0 and 1 are special; they form the
 
1542
                 * bi-directional USB endpoint 0.
 
1543
                 *
 
1544
                 * For those two physical endpoints, we don't allocate a TRB
 
1545
                 * pool nor do we add them the endpoints list. Due to that, we
 
1546
                 * shouldn't do these two operations otherwise we would end up
 
1547
                 * with all sorts of bugs when removing dwc3.ko.
 
1548
                 */
 
1549
                if (epnum != 0 && epnum != 1) {
 
1550
                        dwc3_free_trb_pool(dep);
1543
1551
                        list_del(&dep->endpoint.ep_list);
 
1552
                }
1544
1553
 
1545
1554
                kfree(dep);
1546
1555
        }