Re: [PATCH 3/9] usb/gadget: move global vars from epautoconf into struct usb_gadget

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

 



On 08/23/2012 03:15 PM, Michal Nazarewicz wrote:
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index fdf85a7..01fe02a 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -537,6 +537,12 @@ struct usb_gadget {
  	unsigned			a_alt_hnp_support:1;
  	const char			*name;
  	struct device			dev;
+	unsigned			epnum;
+/* #define MANY_ENDPOINTS */
+#ifdef MANY_ENDPOINTS
+	/* more than 15 configurable endpoints */
+	unsigned			in_epnum;
+#endif
  };

This looks tricky.  At the moment, MANY_ENDPOINTS is not defined
anywhere, but if for some reason someone tries to define it in some
composite gadgets, we may end up with different definitions of
usb_gadget structure.  It appears to me that we should drop this all
together or switch it to Kconfig option.

Sounds like a plan. I think I drop the ifdef. DWC3 supports 32
endpoints. So with configfs and a giant gadget we might hit that 15ep
limit.

Sebastian
--
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