tty: moxa: fix bit test in moxa_start()
Subsystems (2)
PATCH 1/1 tty: moxa: fix bit test in moxa_start()
This is supposed to be doing a shift before the comparison instead of just doing a bitwise AND directly. The current code means the start() just returns without doing anything.
drivers/tty/moxa.c +1 -1
@@ -1331,7 +1331,7 @@ static void moxa_start(struct tty_struct *tty)if (ch =NULL )return ; -if (!(ch->statusflags &TXSTOPPED )) +if (!test_bit (TXSTOPPED , &ch->statusflags))return ;MoxaPortTxEnable (ch);
Quoted 5 lines · Dan Carpenter
This is supposed to be doing a shift before the comparison instead of just doing a bitwise AND directly. The current code means the
start()just returns without doing anything.Signed-off-by Dan Carpenter <[email protected]>
ACK.
It was introduced by this commit which forgot to change that location:
commit a808ac0c4a2c5d81ba38a2a76d4ddc1de40d1539
Author: Alan Cox <[email protected]> Date: Mon Nov 30 13:18:02 2009 +0000
tty: moxa: Locking clean up
drivers/tty/moxa.c static void moxa_start(struct tty_struct *tty) · line 1337
Quoted 13 lines
drivers/tty/moxa.c +1
-1@@ -1331,7 +1331,7 @@ static void moxa_start(struct tty_struct *tty)if (ch =NULL )return ; -if (!(ch->statusflags &TXSTOPPED )) +if (!test_bit (TXSTOPPED , &ch->statusflags))return ;MoxaPortTxEnable (ch);
thanks,
Signature · 2 lines
js suse labs
Quoted 5 lines · On Wed, 7 Mar 2012 13:05:00 +0300 Dan Carpenter <[email protected]>…
This is supposed to be doing a shift before the comparison instead of just doing a bitwise AND directly. The current code means the
start()just returns without doing anything.Signed-off-by Dan Carpenter <[email protected]>