[PATCH 3.2 25/77] USB: cdc-acm - Add IGNORE_DEVICE quirk

Ben Hutchings
2015-12-24T15:43:53Z

From: Ben Hutchings <ben@decadent.org.uk>

Extracted from commit 16142655269a ("USB: cdc-acm - blacklist IMS PCU
device").

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -916,6 +916,10 @@ static int acm_probe(struct usb_interfac

/* normal quirks */
quirks = (unsigned long)id->driver_info;
+
+ if (quirks == IGNORE_DEVICE)
+ return -ENODEV;
+
num_rx_buf = (quirks == SINGLE_RX_URB) ? 1 : ACM_NR;

/* handle quirks deadly to normal probing*/
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -127,4 +127,5 @@ struct acm {
#define NO_CAP_LINE 4
#define NOT_A_MODEM 8
#define NO_DATA_INTERFACE 16
+#define IGNORE_DEVICE 32
#define CLEAR_HALT_CONDITIONS BIT(7)