diff options
author | Alan Cox <alan@redhat.com> | 2008-12-05 22:31:52 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-05 22:31:52 -0800 |
commit | 8a1ec21e6c856b996cffcd4b33f037f6748a3ab4 (patch) | |
tree | 048a099c0ee072c66f7ce21ed8f7f58c425b59b4 /drivers/net/irda | |
parent | 098401a600b6344771900fe164c5eafb668ce99c (diff) | |
download | linux-3.10-8a1ec21e6c856b996cffcd4b33f037f6748a3ab4.tar.gz linux-3.10-8a1ec21e6c856b996cffcd4b33f037f6748a3ab4.tar.bz2 linux-3.10-8a1ec21e6c856b996cffcd4b33f037f6748a3ab4.zip |
tty: Flags should be accessed via the foo_bit interfaces
We have various drivers that poke around directly and we need to clean this
up before it causes problems.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/irtty-sir.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c index 6bcee01c684..d53aa958213 100644 --- a/drivers/net/irda/irtty-sir.c +++ b/drivers/net/irda/irtty-sir.c @@ -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); |