usb: dwc3: gadget: move set_xfer_resource() in place of prototype
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 9 Apr 2018 09:49:02 +0000 (12:49 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 21 May 2018 07:00:59 +0000 (10:00 +0300)
Instead of having a prototype for a function that's defined a few
lines down, let's just move definition to the place where prototype
was.

No functional changes, cleanup only.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c

index 20c6d3e..a170c07 100644 (file)
@@ -455,7 +455,17 @@ static void dwc3_free_trb_pool(struct dwc3_ep *dep)
        dep->trb_pool_dma = 0;
 }
 
-static int dwc3_gadget_set_xfer_resource(struct dwc3_ep *dep);
+static int dwc3_gadget_set_xfer_resource(struct dwc3_ep *dep)
+{
+       struct dwc3_gadget_ep_cmd_params params;
+
+       memset(&params, 0x00, sizeof(params));
+
+       params.param0 = DWC3_DEPXFERCFG_NUM_XFER_RES(1);
+
+       return dwc3_send_gadget_ep_cmd(dep, DWC3_DEPCMD_SETTRANSFRESOURCE,
+                       &params);
+}
 
 /**
  * dwc3_gadget_start_config - configure ep resources
@@ -587,18 +597,6 @@ static int dwc3_gadget_set_ep_config(struct dwc3_ep *dep, unsigned int action)
        return dwc3_send_gadget_ep_cmd(dep, DWC3_DEPCMD_SETEPCONFIG, &params);
 }
 
-static int dwc3_gadget_set_xfer_resource(struct dwc3_ep *dep)
-{
-       struct dwc3_gadget_ep_cmd_params params;
-
-       memset(&params, 0x00, sizeof(params));
-
-       params.param0 = DWC3_DEPXFERCFG_NUM_XFER_RES(1);
-
-       return dwc3_send_gadget_ep_cmd(dep, DWC3_DEPCMD_SETTRANSFRESOURCE,
-                       &params);
-}
-
 /**
  * __dwc3_gadget_ep_enable - initializes a hw endpoint
  * @dep: endpoint to be initialized