aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/x25_asy.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/wan/x25_asy.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/wan/x25_asy.c')
-rw-r--r--drivers/net/wan/x25_asy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 85d789147300..7c5ac40f8725 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -242,7 +242,7 @@ static void x25_asy_encaps(struct x25_asy *sl, unsigned char *icp, int len)
242 * if we did not request it before write operation. 242 * if we did not request it before write operation.
243 * 14 Oct 1994 Dmitry Gorodchanin. 243 * 14 Oct 1994 Dmitry Gorodchanin.
244 */ 244 */
245 sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); 245 set_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
246 actual = sl->tty->ops->write(sl->tty, sl->xbuff, count); 246 actual = sl->tty->ops->write(sl->tty, sl->xbuff, count);
247 sl->xleft = count - actual; 247 sl->xleft = count - actual;
248 sl->xhead = sl->xbuff + actual; 248 sl->xhead = sl->xbuff + actual;
@@ -267,7 +267,7 @@ static void x25_asy_write_wakeup(struct tty_struct *tty)
267 /* Now serial buffer is almost free & we can start 267 /* Now serial buffer is almost free & we can start
268 * transmission of another packet */ 268 * transmission of another packet */
269 sl->stats.tx_packets++; 269 sl->stats.tx_packets++;
270 tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); 270 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
271 x25_asy_unlock(sl); 271 x25_asy_unlock(sl);
272 return; 272 return;
273 } 273 }
@@ -290,7 +290,7 @@ static void x25_asy_timeout(struct net_device *dev)
290 (tty_chars_in_buffer(sl->tty) || sl->xleft) ? 290 (tty_chars_in_buffer(sl->tty) || sl->xleft) ?
291 "bad line quality" : "driver error"); 291 "bad line quality" : "driver error");
292 sl->xleft = 0; 292 sl->xleft = 0;
293 sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); 293 clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
294 x25_asy_unlock(sl); 294 x25_asy_unlock(sl);
295 } 295 }
296 spin_unlock(&sl->lock); 296 spin_unlock(&sl->lock);
@@ -500,7 +500,7 @@ static int x25_asy_close(struct net_device *dev)
500 500
501 spin_lock(&sl->lock); 501 spin_lock(&sl->lock);
502 if (sl->tty) 502 if (sl->tty)
503 sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); 503 clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
504 504
505 netif_stop_queue(dev); 505 netif_stop_queue(dev);
506 sl->rcount = 0; 506 sl->rcount = 0;