Commit 73b2ed36 authored by Jiri Slaby (SUSE)'s avatar Jiri Slaby (SUSE) Committed by Greg Kroah-Hartman

tty: amiserial: use bool and rename overrun flag in receive_chars()

'oe' is a yes-no flag, switch it to boolean. And rename to overrun. All
for the code to be more obvious.
Signed-off-by: default avatar"Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20231121092258.9334-7-jirislaby@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c35e6ec1
......@@ -180,7 +180,7 @@ static void receive_chars(struct serial_state *info)
int serdatr;
unsigned char ch, flag;
struct async_icount *icount;
int oe = 0;
bool overrun = false;
icount = &info->icount;
......@@ -251,11 +251,11 @@ static void receive_chars(struct serial_state *info)
* reported immediately, and doesn't
* affect the current character
*/
oe = 1;
overrun = true;
}
}
tty_insert_flip_char(&info->tport, ch, flag);
if (oe == 1)
if (overrun)
tty_insert_flip_char(&info->tport, 0, TTY_OVERRUN);
tty_flip_buffer_push(&info->tport);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment