]> git.kernelconcepts.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>
Thu, 8 Mar 2012 20:55:48 +0000 (12:55 -0800)
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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/moxa.c

index 4a26323a926f7260f7dfbfc519674d62c43881c9..8a8d0440bab0c44f82d3576b901d7260b234a54b 100644 (file)
@@ -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);