]> git.baikalelectronics.ru Git - kernel.git/commit
mxser: simplify condition in mxser_receive_chars_new
authorJiri Slaby <jslaby@suse.cz>
Wed, 22 Sep 2021 07:59:33 +0000 (09:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Oct 2021 12:08:08 +0000 (14:08 +0200)
commit3a05eb416e1e2173cb779deecfd3c1632f51e214
treeaffbc0f8f277641299e4b9c8a3af3a1474a3b804
parentfd3d1e6e87d86d52edcdfd31c9c7152b719a08f8
mxser: simplify condition in mxser_receive_chars_new

mxser_receive_chars_old() is used whenever MOXA_MUST_LSR_RERR is set in
status no matter the HW ID (the last 'if'). So there is no need for
another check of MOXA_MUST_LSR_RERR _with_ hwid == MOXA_MUST_MU860_HWID
(the third 'if').  Hence remove this subcase. That allows us to check
status on a single line with both UART_LSR_BRK_ERROR_BITS (from the
second 'if') and MOXA_MUST_LSR_RERR (the last 'if').

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210922075938.31390-2-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c