Skip to content

Commit 797bd4d

Browse files
Jiri Slabygregkh
authored andcommitted
tty: serial: define UART_LCR_WLEN() macro
Define a generic UART_LCR_WLEN() macro with a size argument. It can be used to encode byte size into an LCR value. Therefore we can use it to simplify the drivers using tty_get_char_size() in the next patches. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220224095558.30929-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d4ab548 commit 797bd4d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

include/linux/serial.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <asm/page.h>
1313
#include <uapi/linux/serial.h>
1414

15+
/* Helper for dealing with UART_LCR_WLEN* defines */
16+
#define UART_LCR_WLEN(x) ((x) - 5)
1517

1618
/*
1719
* Counters of the input lines (CTS, DSR, RI, CD) interrupts

0 commit comments

Comments
 (0)