From: Ilpo Järvinen Date: Fri, 13 May 2022 08:29:06 +0000 (+0300) Subject: serial: jsm: Use B0 instead of 0 X-Git-Tag: v5.19-rc1~47^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2da6f1e5f72a3ea8a5aed85a8473a710d2e41ffb;p=thirdparty%2Flinux.git serial: jsm: Use B0 instead of 0 Use B0 to check zero baudrate rather than literal 0. While at it, remove extra parenthesis around CBAUD. Reviewed-by: Johan Hovold Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20220513082906.11096-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/jsm/jsm_cls.c b/drivers/tty/serial/jsm/jsm_cls.c index 046b624e5f71d..3fd57ac3ad81c 100644 --- a/drivers/tty/serial/jsm/jsm_cls.c +++ b/drivers/tty/serial/jsm/jsm_cls.c @@ -689,7 +689,7 @@ static void cls_param(struct jsm_channel *ch) /* * If baud rate is zero, flush queues, and set mval to drop DTR. */ - if ((ch->ch_c_cflag & (CBAUD)) == 0) { + if ((ch->ch_c_cflag & CBAUD) == B0) { ch->ch_r_head = 0; ch->ch_r_tail = 0; ch->ch_e_head = 0; diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c index 0cf586c10688d..0c78f66276cd5 100644 --- a/drivers/tty/serial/jsm/jsm_neo.c +++ b/drivers/tty/serial/jsm/jsm_neo.c @@ -938,7 +938,7 @@ static void neo_param(struct jsm_channel *ch) /* * If baud rate is zero, flush queues, and set mval to drop DTR. */ - if ((ch->ch_c_cflag & (CBAUD)) == 0) { + if ((ch->ch_c_cflag & CBAUD) == B0) { ch->ch_r_head = ch->ch_r_tail = 0; ch->ch_e_head = ch->ch_e_tail = 0;