public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] uapi: cdc.h: cleanly provide for more interfaces and countries
@ 2025-10-28 12:32 Oliver Neukum
  2025-10-28 13:32 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Neukum @ 2025-10-28 12:32 UTC (permalink / raw)
  To: gregkh, linux-usb; +Cc: Oliver Neukum

The spec requires at least one interface respectively country.
It allows multiple ones. This needs to be clearly said in the UAPI.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 include/uapi/linux/usb/cdc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/usb/cdc.h b/include/uapi/linux/usb/cdc.h
index 1924cf665448..5fcbce0be133 100644
--- a/include/uapi/linux/usb/cdc.h
+++ b/include/uapi/linux/usb/cdc.h
@@ -105,7 +105,7 @@ struct usb_cdc_union_desc {
 
 	__u8	bMasterInterface0;
 	__u8	bSlaveInterface0;
-	/* ... and there could be other slave interfaces */
+	__u8	bSlaveInterfaces[];
 } __attribute__ ((packed));
 
 /* "Country Selection Functional Descriptor" from CDC spec 5.2.3.9 */
@@ -116,7 +116,7 @@ struct usb_cdc_country_functional_desc {
 
 	__u8	iCountryCodeRelDate;
 	__le16	wCountyCode0;
-	/* ... and there can be a lot of country codes */
+	__le16	wCountyCodes[];
 } __attribute__ ((packed));
 
 /* "Network Channel Terminal Functional Descriptor" from CDC spec 5.2.3.11 */
-- 
2.51.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-29  7:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-28 12:32 [PATCH 1/1] uapi: cdc.h: cleanly provide for more interfaces and countries Oliver Neukum
2025-10-28 13:32 ` Greg KH
2025-10-28 14:34   ` Oliver Neukum
2025-10-28 14:40     ` Greg KH
2025-10-28 16:43       ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox