[PATCH 4.4 15/38] USB: cdc-acm: fix TIOCMIWAIT
From: Greg Kroah-Hartman
Date: Thu Nov 17 2016 - 05:41:42 EST
4.4-stable review patch. If anyone has any objections, please let me know.
From: Johan Hovold <johan@xxxxxxxxxx>
commit 18266403f3fe507f0246faa1d5432333a2f139ca upstream.
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")
Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
Acked-by: Oliver Neukum <oneukum@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
drivers/usb/class/cdc-acm.c | 2 --
1 file changed, 2 deletions(-)
@@ -877,8 +877,6 @@ static int wait_serial_change(struct acm
struct async_icount old, new;
- if (arg & (TIOCM_DSR | TIOCM_RI | TIOCM_CD ))
- return -EINVAL;
old = acm->oldcount;