USB: cdc-acm: use common data-class define
Use the data-class define provided by USB core and drop the driver-specific one. Acked-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20200921135951.24045-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
960c7339de
commit
319bb4a7fe
@ -1288,10 +1288,8 @@ look_for_collapsed_interface:
|
|||||||
skip_normal_probe:
|
skip_normal_probe:
|
||||||
|
|
||||||
/*workaround for switched interfaces */
|
/*workaround for switched interfaces */
|
||||||
if (data_interface->cur_altsetting->desc.bInterfaceClass
|
if (data_interface->cur_altsetting->desc.bInterfaceClass != USB_CLASS_CDC_DATA) {
|
||||||
!= CDC_DATA_INTERFACE_TYPE) {
|
if (control_interface->cur_altsetting->desc.bInterfaceClass == USB_CLASS_CDC_DATA) {
|
||||||
if (control_interface->cur_altsetting->desc.bInterfaceClass
|
|
||||||
== CDC_DATA_INTERFACE_TYPE) {
|
|
||||||
dev_dbg(&intf->dev,
|
dev_dbg(&intf->dev,
|
||||||
"Your device has switched interfaces.\n");
|
"Your device has switched interfaces.\n");
|
||||||
swap(control_interface, data_interface);
|
swap(control_interface, data_interface);
|
||||||
|
@ -131,8 +131,6 @@ struct acm {
|
|||||||
unsigned long quirks;
|
unsigned long quirks;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CDC_DATA_INTERFACE_TYPE 0x0a
|
|
||||||
|
|
||||||
/* constants describing various quirks and errors */
|
/* constants describing various quirks and errors */
|
||||||
#define NO_UNION_NORMAL BIT(0)
|
#define NO_UNION_NORMAL BIT(0)
|
||||||
#define SINGLE_RX_URB BIT(1)
|
#define SINGLE_RX_URB BIT(1)
|
||||||
|
Reference in New Issue
Block a user