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: MMI-PSA29.97-13-9~17267^2~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=58112dfbfe02d803566a2c6c8bd97b5fa3c62cdc;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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. Signed-off-by: Dan Carpenter Acked-by: Jiri Slaby Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c index 4a26323a926f..8a8d0440bab0 100644 --- a/drivers/tty/moxa.c +++ b/drivers/tty/moxa.c @@ -1330,7 +1330,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);