Skip to content

Commit e15c99b

Browse files
cniedermaiergregkh
authored andcommitted
tty: serial: Fix bit order in RS485 flag definitions
Since the commit 93f3350 ("RS485: fix inconsistencies in the meaning of some variables"), the definition for bit 3 has been removed. But with the switch to bit shift macros in commit 76ac8e2 ("tty: serial: Cleanup the bit shift with macro"), this gap wasn't preserved. To avoid a break in user/kernel api of the system skip bit 3 again and add a placeholder comment. Signed-off-by: Christoph Niedermaier <[email protected]> Fixes: 76ac8e2 ("tty: serial: Cleanup the bit shift with macro") Fixes: 6056f20 ("tty: serial: Add RS422 flag to struct serial_rs485") Reviewed-by: Jiri Slaby <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Crescent CY Hsieh <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Lukas Wunner <[email protected]> Cc: Lino Sanfilippo <[email protected]> Cc: Hugo Villeneuve <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6613476 commit e15c99b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

include/uapi/linux/serial.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,13 @@ struct serial_rs485 {
145145
#define SER_RS485_ENABLED _BITUL(0)
146146
#define SER_RS485_RTS_ON_SEND _BITUL(1)
147147
#define SER_RS485_RTS_AFTER_SEND _BITUL(2)
148-
#define SER_RS485_RX_DURING_TX _BITUL(3)
149-
#define SER_RS485_TERMINATE_BUS _BITUL(4)
150-
#define SER_RS485_ADDRB _BITUL(5)
151-
#define SER_RS485_ADDR_RECV _BITUL(6)
152-
#define SER_RS485_ADDR_DEST _BITUL(7)
153-
#define SER_RS485_MODE_RS422 _BITUL(8)
148+
/* Placeholder for bit 3: SER_RS485_RTS_BEFORE_SEND, which isn't used anymore */
149+
#define SER_RS485_RX_DURING_TX _BITUL(4)
150+
#define SER_RS485_TERMINATE_BUS _BITUL(5)
151+
#define SER_RS485_ADDRB _BITUL(6)
152+
#define SER_RS485_ADDR_RECV _BITUL(7)
153+
#define SER_RS485_ADDR_DEST _BITUL(8)
154+
#define SER_RS485_MODE_RS422 _BITUL(9)
154155

155156
__u32 delay_rts_before_send;
156157
__u32 delay_rts_after_send;

0 commit comments

Comments
 (0)