From: Dan Carpenter Date: Wed, 7 Mar 2012 10:05:00 +0000 (+0300) Subject: tty: moxa: fix bit test in moxa_start() X-Git-Tag: v3.3.1~146 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d3abff4f339019cd208ebefa35ab9b7fcaad93b1;p=karo-tx-linux.git tty: moxa: fix bit test in moxa_start() commit 58112dfbfe02d803566a2c6c8bd97b5fa3c62cdc upstream. 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 Acked-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c index d15a071b1a54..0174d2d2a483 100644 --- a/drivers/tty/moxa.c +++ b/drivers/tty/moxa.c @@ -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);