From 4291fb67a35bcc2c2f7a3ccd1d785c42dc9d96e4 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Wed, 4 Apr 2018 12:41:45 +0300 Subject: [PATCH] usb: Remove duplicated CDC_ECM_SUBCLASS definition Use ECM_SUBCLASS instead. Signed-off-by: Andrei Emeltchenko --- include/usb/usb_common.h | 1 - subsys/usb/usb_descriptor.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/usb/usb_common.h b/include/usb/usb_common.h index af1b1c57546..e723b2bd41a 100644 --- a/include/usb/usb_common.h +++ b/include/usb/usb_common.h @@ -104,7 +104,6 @@ /* Sub-classes */ #define ACM_SUBCLASS 0x02 -#define CDC_ECM_SUBCLASS 0x06 #define CDC_NCM_SUBCLASS 0x0d #define BOOT_INTERFACE_SUBCLASS 0x01 #define SCSI_TRANSPARENT_SUBCLASS 0x06 diff --git a/subsys/usb/usb_descriptor.c b/subsys/usb/usb_descriptor.c index 2588d16b264..8b32638a16e 100644 --- a/subsys/usb/usb_descriptor.c +++ b/subsys/usb/usb_descriptor.c @@ -411,7 +411,7 @@ static struct dev_common_descriptor common_desc = { .bFirstInterface = FIRST_IFACE_CDC_ECM, .bInterfaceCount = 0x02, .bFunctionClass = COMMUNICATION_DEVICE_CLASS, - .bFunctionSubClass = CDC_ECM_SUBCLASS, + .bFunctionSubClass = ECM_SUBCLASS, .bFunctionProtocol = 0, .iFunction = 0, }, @@ -426,7 +426,7 @@ static struct dev_common_descriptor common_desc = { .bAlternateSetting = 0, .bNumEndpoints = 1, .bInterfaceClass = COMMUNICATION_DEVICE_CLASS, - .bInterfaceSubClass = CDC_ECM_SUBCLASS, + .bInterfaceSubClass = ECM_SUBCLASS, .bInterfaceProtocol = 0, .iInterface = 0, }, @@ -491,7 +491,7 @@ static struct dev_common_descriptor common_desc = { .bAlternateSetting = 1, .bNumEndpoints = 2, .bInterfaceClass = COMMUNICATION_DEVICE_CLASS_DATA, - .bInterfaceSubClass = CDC_ECM_SUBCLASS, + .bInterfaceSubClass = ECM_SUBCLASS, .bInterfaceProtocol = 0, .iInterface = 0, },