]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/irda/irtty-sir.c
tty: Flags should be accessed via the foo_bit interfaces
[linux-2.6-omap-h63xx.git] / drivers / net / irda / irtty-sir.c
index 6bcee01c684cd4bb3aea00abb6e2dd00ff0e8d3b..d53aa9582137d241f0cdf22e092de488ec81efb9 100644 (file)
@@ -191,7 +191,7 @@ static int irtty_do_write(struct sir_dev *dev, const unsigned char *ptr, size_t
        tty = priv->tty;
        if (!tty->ops->write)
                return 0;
-       tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
+       set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
        writelen = tty_write_room(tty);
        if (writelen > len)
                writelen = len;
@@ -263,8 +263,7 @@ static void irtty_write_wakeup(struct tty_struct *tty)
        IRDA_ASSERT(priv != NULL, return;);
        IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return;);
 
-       tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
-
+       clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
        if (priv->dev)
                sirdev_write_complete(priv->dev);
 }
@@ -522,7 +521,7 @@ static void irtty_close(struct tty_struct *tty)
 
        /* Stop tty */
        irtty_stop_receiver(tty, TRUE);
-       tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
+       clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
        if (tty->ops->stop)
                tty->ops->stop(tty);