]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tty: moxa: fix bit test in moxa_start()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 7 Mar 2012 10:05:00 +0000 (13:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 17:31:35 +0000 (10:31 -0700)
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 <dan.carpenter@oracle.com>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/moxa.c

index d15a071b1a54c54099a9e17cc67f6f4837e8a68c..0174d2d2a483d2e1c5a1d40e650103ab48228679 100644 (file)
@@ -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);