mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 01:54:09 +08:00
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 <johan@kernel.org> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220513082906.11096-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
503f418b10
commit
2da6f1e5f7
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user