usb: gadget: remove useless parameter in alloc_ep_req()

The default_length parameter of alloc_ep_req was not really necessary
and gadget drivers would almost always create an inline function to pass
the same value to len and default_len.

This patch removes that parameter and updates all calls to alloc_ep_req() to
use the new API.

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
Felipe F. Tonello
2016-08-23 18:24:49 +01:00
committed by Felipe Balbi
parent 06281d460f
commit aadbe81246
6 changed files with 10 additions and 16 deletions

View File

@@ -293,9 +293,7 @@ static struct usb_gadget_strings *sourcesink_strings[] = {
static inline struct usb_request *ss_alloc_ep_req(struct usb_ep *ep, int len)
{
struct f_sourcesink *ss = ep->driver_data;
return alloc_ep_req(ep, len, ss->buflen);
return alloc_ep_req(ep, len);
}
static void disable_ep(struct usb_composite_dev *cdev, struct usb_ep *ep)
@@ -606,7 +604,7 @@ static int source_sink_start_ep(struct f_sourcesink *ss, bool is_in,
} else {
ep = is_in ? ss->in_ep : ss->out_ep;
qlen = ss->bulk_qlen;
size = 0;
size = ss->buflen;
}
for (i = 0; i < qlen; i++) {