From a8d78d9f385642696723fcb9c52c2c2805fa4249 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Thu, 25 Apr 2019 18:05:37 +0200 Subject: USB: serial: clean up throttle handling Clean up the throttle implementation by dropping the redundant throttle_req flag which was a remnant from back when there was only a single read URB. Also convert the throttled flag to an atomic bit flag. Signed-off-by: Johan Hovold --- include/linux/usb/serial.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include/linux/usb') diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 1c19f77ed541..d8bdab8f3c26 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h @@ -28,6 +28,7 @@ /* USB serial flags */ #define USB_SERIAL_WRITE_BUSY 0 +#define USB_SERIAL_THROTTLED 1 /** * usb_serial_port: structure for the specific ports of a device. @@ -67,8 +68,6 @@ * @flags: usb serial port flags * @write_wait: a wait_queue_head_t used by the port. * @work: work queue entry for the line discipline waking up. - * @throttled: nonzero if the read urb is inactive to throttle the device - * @throttle_req: nonzero if the tty wants to throttle us * @dev: pointer to the serial device * * This structure is used by the usb-serial core and drivers for the specific @@ -115,8 +114,6 @@ struct usb_serial_port { unsigned long flags; wait_queue_head_t write_wait; struct work_struct work; - char throttled; - char throttle_req; unsigned long sysrq; /* sysrq timeout */ struct device dev; }; -- cgit From 80ed53707bb3ec92c331ca33f45c113338ee434d Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 26 Apr 2019 08:01:32 +0200 Subject: USB: serial: drop unused iflag macro Drop the RELEVANT_IFLAG() macro which essentially hasn't been used for over a decade except in some remnant debug printks that were recently removed. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold --- include/linux/usb/serial.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/linux/usb') diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index d8bdab8f3c26..14cac4a1ae8f 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h @@ -23,9 +23,6 @@ /* The maximum number of ports one device can grab at once */ #define MAX_NUM_PORTS 16 -/* parity check flag */ -#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) - /* USB serial flags */ #define USB_SERIAL_WRITE_BUSY 0 #define USB_SERIAL_THROTTLED 1 -- cgit