Re: [PATCH 2/2] usb: dwc3: gadget: use num_(in|out)_eps from HW params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 06-03-2013 22:37, 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'?

makes no difference

  {
  	struct dwc3_ep			*dep;
-	u8				epnum;
+	u8				i;

    Why not 'u32 i' if the loop is for 'u32 num'?

because no device will ever have 255 endpoints

   Then why not 'u8 num'?

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux