summaryrefslogtreecommitdiffstats
path: root/drivers/net/slip.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-12-05 22:31:52 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-05 22:31:52 -0800
commit8a1ec21e6c856b996cffcd4b33f037f6748a3ab4 (patch)
tree048a099c0ee072c66f7ce21ed8f7f58c425b59b4 /drivers/net/slip.c
parent098401a600b6344771900fe164c5eafb668ce99c (diff)
downloadlinux-8a1ec21e6c856b996cffcd4b33f037f6748a3ab4.tar.gz
linux-8a1ec21e6c856b996cffcd4b33f037f6748a3ab4.tar.bz2
linux-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/slip.c')
-rw-r--r--drivers/net/slip.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index 25cec06d6dcc..8e1c0baf6958 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -401,7 +401,7 @@ static void sl_encaps(struct slip *sl, unsigned char *icp, int len)
* if we did not request it before write operation.
* 14 Oct 1994 Dmitry Gorodchanin.
*/
- sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
+ set_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
actual = sl->tty->ops->write(sl->tty, sl->xbuff, count);
#ifdef SL_CHECK_TRANSMIT
sl->dev->trans_start = jiffies;
@@ -431,7 +431,7 @@ static void slip_write_wakeup(struct tty_struct *tty)
/* Now serial buffer is almost free & we can start
* transmission of another packet */
sl->tx_packets++;
- tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
+ clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
sl_unlock(sl);
return;
}
@@ -464,7 +464,7 @@ static void sl_tx_timeout(struct net_device *dev)
(tty_chars_in_buffer(sl->tty) || sl->xleft) ?
"bad line quality" : "driver error");
sl->xleft = 0;
- sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
+ clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
sl_unlock(sl);
#endif
}
@@ -514,10 +514,9 @@ sl_close(struct net_device *dev)
struct slip *sl = netdev_priv(dev);
spin_lock_bh(&sl->lock);
- if (sl->tty) {
+ if (sl->tty)
/* TTY discipline is running. */
- sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
- }
+ clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
netif_stop_queue(dev);
sl->rcount = 0;
sl->xleft = 0;