From: Jiri Slaby <jslaby@suse.cz>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH 3/7] mxser: make mxser_port::ldisc_stop_rx a bool
Date: Wed, 22 Sep 2021 09:59:34 +0200 [thread overview]
Message-ID: <20210922075938.31390-3-jslaby@suse.cz> (raw)
In-Reply-To: <20210922075938.31390-1-jslaby@suse.cz>
It's used only as a yes-no variable, so make it a bool and switch the
set values appropriately.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/tty/mxser.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index f907de56e08b..309acf3f1ec3 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -250,7 +250,7 @@ struct mxser_port {
u8 IER; /* Interrupt Enable Register */
u8 MCR; /* Modem control register */
- unsigned char ldisc_stop_rx;
+ bool ldisc_stop_rx;
struct async_icount icount; /* kernel counters for 4 input interrupts */
unsigned int timeout;
@@ -1341,7 +1341,7 @@ static void mxser_stoprx(struct tty_struct *tty)
{
struct mxser_port *info = tty->driver_data;
- info->ldisc_stop_rx = 1;
+ info->ldisc_stop_rx = true;
if (I_IXOFF(tty)) {
if (info->board->must_hwid) {
info->IER &= ~MOXA_MUST_RECV_ISR;
@@ -1374,7 +1374,7 @@ static void mxser_unthrottle(struct tty_struct *tty)
struct mxser_port *info = tty->driver_data;
/* startrx */
- info->ldisc_stop_rx = 0;
+ info->ldisc_stop_rx = false;
if (I_IXOFF(tty)) {
if (info->x_char)
info->x_char = 0;
@@ -1849,7 +1849,7 @@ static void mxser_initbrd(struct mxser_board *brd, bool high_baud)
tty_port_init(&info->port);
info->port.ops = &mxser_port_ops;
info->board = brd;
- info->ldisc_stop_rx = 0;
+ info->ldisc_stop_rx = false;
/* Enhance mode enabled here */
if (brd->must_hwid != MOXA_OTHER_UART)
--
2.33.0
next prev parent reply other threads:[~2021-09-22 7:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 7:59 [PATCH 1/7] mxser: restore baud rate if its setting fails Jiri Slaby
2021-09-22 7:59 ` [PATCH 2/7] mxser: simplify condition in mxser_receive_chars_new Jiri Slaby
2021-09-22 7:59 ` Jiri Slaby [this message]
2021-09-22 7:59 ` [PATCH 4/7] mxser: simplify FCR computation in mxser_change_speed() Jiri Slaby
2021-09-22 7:59 ` [PATCH 5/7] mxser: move FIFO clearing to mxser_disable_and_clear_FIFO() Jiri Slaby
2021-09-22 7:59 ` [PATCH 6/7] mxser: don't read from UART_FCR Jiri Slaby
2021-09-22 7:59 ` [PATCH 7/7] mxser: store FCR state in mxser_port::FCR Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210922075938.31390-3-jslaby@suse.cz \
--to=jslaby@suse.cz \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).