Skip to content

Commit 3122698

Browse files
committed
USB: cdc-acm: Fix bit overlap and move quirk definitions to header
The VENDOR_CLASS_DATA_IFACE and ALWAYS_POLL_CTRL quirk flags added in commit f58752ebcb35 ("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen") were placed inside the acm_ctrl_msg() function rather than in the header with the other quirk flags. Worse, their values (BIT(9) and BIT(10)) collided with NO_UNION_12 which is already BIT(9). Move the definitions to drivers/usb/class/cdc-acm.h where they belong and shift them to BIT(10) and BIT(11) to avoid the overlap. Fixes: f58752ebcb35 ("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen") Cc: stable@vger.kernel.org Signed-off-by: Wentao Guan <guanwentao@uniontech.com> (cherry picked from commit 12b9827) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 45bb245 commit 3122698

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/usb/class/cdc-acm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ static int acm_ctrl_msg(struct acm *acm, int request, int value,
114114
int retval;
115115

116116
retval = usb_autopm_get_interface(acm->control);
117-
#define VENDOR_CLASS_DATA_IFACE BIT(9) /* data interface uses vendor-specific class */
118-
#define ALWAYS_POLL_CTRL BIT(10) /* keep ctrl URB active even without an open TTY */
119117
if (retval)
120118
return retval;
121119

drivers/usb/class/cdc-acm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,5 @@ struct acm {
115115
#define DISABLE_ECHO BIT(7)
116116
#define MISSING_CAP_BRK BIT(8)
117117
#define NO_UNION_12 BIT(9)
118+
#define VENDOR_CLASS_DATA_IFACE BIT(10) /* data interface uses vendor-specific class */
119+
#define ALWAYS_POLL_CTRL BIT(11) /* keep ctrl URB active even without an open TTY */

0 commit comments

Comments
 (0)