Commit 2da6f1e5 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220513082906.11096-6-ilpo.jarvinen@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 503f418b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 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_head = 0;
		ch->ch_r_tail = 0;
		ch->ch_r_tail = 0;
		ch->ch_e_head = 0;
		ch->ch_e_head = 0;
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 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_r_head = ch->ch_r_tail = 0;
		ch->ch_e_head = ch->ch_e_tail = 0;
		ch->ch_e_head = ch->ch_e_tail = 0;