usb: dwc3: rename res_trans_idx to resource_index
authorFelipe Balbi <balbi@ti.com>
Wed, 6 Jun 2012 09:04:13 +0000 (12:04 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 25 Jun 2012 11:00:45 +0000 (14:00 +0300)
resource_index is more human readable. No
functional changes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.h
drivers/usb/dwc3/ep0.c
drivers/usb/dwc3/gadget.c

index d3e56cfb29c3cbfd2648a82933000e047e47d1d5..151eca876dfd17845b071a7f1528105250d47aaa 100644 (file)
@@ -404,7 +404,7 @@ struct dwc3_event_buffer {
  * @current_trb: index of current used trb
  * @number: endpoint number (1 - 15)
  * @type: set to bmAttributes & USB_ENDPOINT_XFERTYPE_MASK
- * @res_trans_idx: Resource transfer index
+ * @resource_index: Resource transfer index
  * @current_uf: Current uf received through last event parameter
  * @interval: the intervall on which the ISOC transfer is started
  * @name: a human readable name e.g. ep1out-bulk
@@ -438,7 +438,7 @@ struct dwc3_ep {
 
        u8                      number;
        u8                      type;
-       u8                      res_trans_idx;
+       u8                      resource_index;
        u16                     current_uf;
        u32                     interval;
 
index 90eb1ba65454714738f90ad531a3994dacebfdb8..9a8f26cef0a1b8100cb3e9e40b4c03dd64a50f3f 100644 (file)
@@ -113,7 +113,7 @@ static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma,
        }
 
        dep->flags |= DWC3_EP_BUSY;
-       dep->res_trans_idx = dwc3_gadget_ep_get_transfer_index(dwc,
+       dep->resource_index = dwc3_gadget_ep_get_transfer_index(dwc,
                        dep->number);
 
        dwc->ep0_next_event = DWC3_EP0_COMPLETE;
@@ -757,7 +757,7 @@ static void dwc3_ep0_xfer_complete(struct dwc3 *dwc,
        struct dwc3_ep          *dep = dwc->eps[event->endpoint_number];
 
        dep->flags &= ~DWC3_EP_BUSY;
-       dep->res_trans_idx = 0;
+       dep->resource_index = 0;
        dwc->setup_packet_pending = false;
 
        switch (dwc->ep0state) {
index 1c98aee051a5098a1c366b98930b207a8da30bd8..1b5fbdd859c2ea593cc3a375a3d01080a85d4931 100644 (file)
@@ -1010,9 +1010,9 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param,
        dep->flags |= DWC3_EP_BUSY;
 
        if (start_new) {
-               dep->res_trans_idx = dwc3_gadget_ep_get_transfer_index(dwc,
+               dep->resource_index = dwc3_gadget_ep_get_transfer_index(dwc,
                                dep->number);
-               WARN_ON_ONCE(!dep->res_trans_idx);
+               WARN_ON_ONCE(!dep->resource_index);
        }
 
        return 0;
@@ -1105,8 +1105,8 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
         */
        if (usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
                        (dep->flags & DWC3_EP_BUSY)) {
-               WARN_ON_ONCE(!dep->res_trans_idx);
-               ret = __dwc3_gadget_kick_transfer(dep, dep->res_trans_idx,
+               WARN_ON_ONCE(!dep->resource_index);
+               ret = __dwc3_gadget_kick_transfer(dep, dep->resource_index,
                                false);
                if (ret && ret != -EBUSY) {
                        struct dwc3     *dwc = dep->dwc;
@@ -1790,7 +1790,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
 
        switch (event->endpoint_event) {
        case DWC3_DEPEVT_XFERCOMPLETE:
-               dep->res_trans_idx = 0;
+               dep->resource_index = 0;
 
                if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
                        dev_dbg(dwc->dev, "%s is an Isochronous endpoint\n",
@@ -1876,16 +1876,16 @@ static void dwc3_stop_active_transfer(struct dwc3 *dwc, u32 epnum)
 
        dep = dwc->eps[epnum];
 
-       if (!dep->res_trans_idx)
+       if (!dep->resource_index)
                return;
 
        cmd = DWC3_DEPCMD_ENDTRANSFER;
        cmd |= DWC3_DEPCMD_HIPRI_FORCERM | DWC3_DEPCMD_CMDIOC;
-       cmd |= DWC3_DEPCMD_PARAM(dep->res_trans_idx);
+       cmd |= DWC3_DEPCMD_PARAM(dep->resource_index);
        memset(&params, 0, sizeof(params));
        ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, cmd, &params);
        WARN_ON_ONCE(ret);
-       dep->res_trans_idx = 0;
+       dep->resource_index = 0;
 }
 
 static void dwc3_stop_active_transfers(struct dwc3 *dwc)