diff options
author | Alan Cox <alan@redhat.com> | 2008-12-06 01:31:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-06 01:31:52 -0500 |
commit | 8a1ec21e6c856b996cffcd4b33f037f6748a3ab4 (patch) | |
tree | 048a099c0ee072c66f7ce21ed8f7f58c425b59b4 /drivers/net/irda/irtty-sir.c | |
parent | 098401a600b6344771900fe164c5eafb668ce99c (diff) |
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/irtty-sir.c')
-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 6bcee01c684c..d53aa9582137 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 | |||
191 | tty = priv->tty; | 191 | tty = priv->tty; |
192 | if (!tty->ops->write) | 192 | if (!tty->ops->write) |
193 | return 0; | 193 | return 0; |
194 | tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); | 194 | set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); |
195 | writelen = tty_write_room(tty); | 195 | writelen = tty_write_room(tty); |
196 | if (writelen > len) | 196 | if (writelen > len) |
197 | writelen = len; | 197 | writelen = len; |
@@ -263,8 +263,7 @@ static void irtty_write_wakeup(struct tty_struct *tty) | |||
263 | IRDA_ASSERT(priv != NULL, return;); | 263 | IRDA_ASSERT(priv != NULL, return;); |
264 | IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return;); | 264 | IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return;); |
265 | 265 | ||
266 | tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); | 266 | clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); |
267 | |||
268 | if (priv->dev) | 267 | if (priv->dev) |
269 | sirdev_write_complete(priv->dev); | 268 | sirdev_write_complete(priv->dev); |
270 | } | 269 | } |
@@ -522,7 +521,7 @@ static void irtty_close(struct tty_struct *tty) | |||
522 | 521 | ||
523 | /* Stop tty */ | 522 | /* Stop tty */ |
524 | irtty_stop_receiver(tty, TRUE); | 523 | irtty_stop_receiver(tty, TRUE); |
525 | tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); | 524 | clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); |
526 | if (tty->ops->stop) | 525 | if (tty->ops->stop) |
527 | tty->ops->stop(tty); | 526 | tty->ops->stop(tty); |
528 | 527 | ||