Skip to contentSkip to conversation

USB: cdc-acm: fix TIOCMIWAIT

PATCH In review Johan Hovold 2 participants 2 messages Nov 8, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: cdc-acm: fix TIOCMIWAIT

The TIOCMIWAIT implementation would return -EINVAL if any of the three supported signals were included in the mask.

Instead of returning an error in case TIOCM_CTS is included, simply drop the mask check completely, which is in accordance with how other drivers implement this ioctl.

Fixes 5a6a62bdb925 ("cdc-acm: add TIOCMIWAIT")
Cc stable <[email protected]>
---
 drivers/usb/class/cdc-acm.c | 2 --
 1 file changed, 2 deletions(-)
drivers/usb/class/cdc-acm.c +0 -2
index 78f0f85bebdc..c2da3811915a 100644
@@ -932,8 +932,6 @@ static int wait_serial_change(struct acm *acm, unsigned long arg)
 	DECLARE_WAITQUEUE(wait, current);
 	struct async_icount old, new;
 
-	if (arg & (TIOCM_DSR | TIOCM_RI | TIOCM_CD))
-		return -EINVAL;
 	do {
 		spin_lock_irq(&acm->read_lock);
 		old = acm->oldcount;
Signature · 1 line
2.7.3
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Johan Hovold

The TIOCMIWAIT implementation would return -EINVAL if any of the three supported signals were included in the mask.

Instead of returning an error in case TIOCM_CTS is included, simply drop the mask check completely, which is in accordance with how other drivers implement this ioctl.

Fixes 5a6a62bdb925 ("cdc-acm: add TIOCMIWAIT")
Cc stable <[email protected]>

Regards
Oliver