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>
Este cometimento está contido em:

cometido por
David S. Miller

ascendente
098401a600
cometimento
8a1ec21e6c
@@ -242,7 +242,7 @@ static void x25_asy_encaps(struct x25_asy *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);
|
||||
sl->xleft = count - actual;
|
||||
sl->xhead = sl->xbuff + actual;
|
||||
@@ -267,7 +267,7 @@ static void x25_asy_write_wakeup(struct tty_struct *tty)
|
||||
/* Now serial buffer is almost free & we can start
|
||||
* transmission of another packet */
|
||||
sl->stats.tx_packets++;
|
||||
tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
|
||||
clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
|
||||
x25_asy_unlock(sl);
|
||||
return;
|
||||
}
|
||||
@@ -290,7 +290,7 @@ static void x25_asy_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);
|
||||
x25_asy_unlock(sl);
|
||||
}
|
||||
spin_unlock(&sl->lock);
|
||||
@@ -500,7 +500,7 @@ static int x25_asy_close(struct net_device *dev)
|
||||
|
||||
spin_lock(&sl->lock);
|
||||
if (sl->tty)
|
||||
sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
|
||||
clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
|
||||
|
||||
netif_stop_queue(dev);
|
||||
sl->rcount = 0;
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador