aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/slip.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-12-06 01:31:52 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-06 01:31:52 -0500
commit8a1ec21e6c856b996cffcd4b33f037f6748a3ab4 (patch)
tree048a099c0ee072c66f7ce21ed8f7f58c425b59b4 /drivers/net/slip.c
parent098401a600b6344771900fe164c5eafb668ce99c (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/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)
401 * if we did not request it before write operation. 401 * if we did not request it before write operation.
402 * 14 Oct 1994 Dmitry Gorodchanin. 402 * 14 Oct 1994 Dmitry Gorodchanin.
403 */ 403 */
404 sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); 404 set_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
405 actual = sl->tty->ops->write(sl->tty, sl->xbuff, count); 405 actual = sl->tty->ops->write(sl->tty, sl->xbuff, count);
406#ifdef SL_CHECK_TRANSMIT 406#ifdef SL_CHECK_TRANSMIT
407 sl->dev->trans_start = jiffies; 407 sl->dev->trans_start = jiffies;
@@ -431,7 +431,7 @@ static void slip_write_wakeup(struct tty_struct *tty)
431 /* Now serial buffer is almost free & we can start 431 /* Now serial buffer is almost free & we can start
432 * transmission of another packet */ 432 * transmission of another packet */
433 sl->tx_packets++; 433 sl->tx_packets++;
434 tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); 434 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
435 sl_unlock(sl); 435 sl_unlock(sl);
436 return; 436 return;
437 } 437 }
@@ -464,7 +464,7 @@ static void sl_tx_timeout(struct net_device *dev)
464 (tty_chars_in_buffer(sl->tty) || sl->xleft) ? 464 (tty_chars_in_buffer(sl->tty) || sl->xleft) ?
465 "bad line quality" : "driver error"); 465 "bad line quality" : "driver error");
466 sl->xleft = 0; 466 sl->xleft = 0;
467 sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); 467 clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
468 sl_unlock(sl); 468 sl_unlock(sl);
469#endif 469#endif
470 } 470 }
@@ -514,10 +514,9 @@ sl_close(struct net_device *dev)
514 struct slip *sl = netdev_priv(dev); 514 struct slip *sl = netdev_priv(dev);
515 515
516 spin_lock_bh(&sl->lock); 516 spin_lock_bh(&sl->lock);
517 if (sl->tty) { 517 if (sl->tty)
518 /* TTY discipline is running. */ 518 /* TTY discipline is running. */
519 sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); 519 clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
520 }
521 netif_stop_queue(dev); 520 netif_stop_queue(dev);
522 sl->rcount = 0; 521 sl->rcount = 0;
523 sl->xleft = 0; 522 sl->xleft = 0;