Hello. On 06-03-2013 21:47, Felipe Balbi wrote:
that way we will only tell gadget framework about the endpoints we actually have.
Signed-off-by: Felipe Balbi <balbi@xxxxxx> --- drivers/usb/dwc3/gadget.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 8e53acc..aad941f 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1623,14 +1623,15 @@ static const struct usb_gadget_ops dwc3_gadget_ops = { /* -------------------------------------------------------------------------- */ -static int dwc3_gadget_init_endpoints(struct dwc3 *dwc) +static int dwc3_gadget_init_hw_endpoints(struct dwc3 *dwc, + u32 num, u32 direction)
Why not 'bool direction'?
{ struct dwc3_ep *dep; - u8 epnum; + u8 i;
Why not 'u32 i' if the loop is for 'u32 num'?
- INIT_LIST_HEAD(&dwc->gadget.ep_list); + for (i = 0; i < num; i++) { + int epnum = (i << 1) | (!!direction);
() around !!x are superfluous I think. WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html