tty: add more tty_port fields
Move more bits into the tty_port structure Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

zatwierdzone przez
Linus Torvalds

rodzic
593573bc55
commit
44b7d1b37f
@@ -261,8 +261,6 @@ struct slgt_info {
|
||||
struct slgt_info *port_array[SLGT_MAX_PORTS];
|
||||
|
||||
int line; /* tty line instance number */
|
||||
unsigned short close_delay;
|
||||
unsigned short closing_wait; /* time to wait before closing */
|
||||
|
||||
struct mgsl_icount icount;
|
||||
|
||||
@@ -758,9 +756,9 @@ static void close(struct tty_struct *tty, struct file *filp)
|
||||
|
||||
/* wait for transmit data to clear all layers */
|
||||
|
||||
if (info->closing_wait != ASYNC_CLOSING_WAIT_NONE) {
|
||||
if (info->port.closing_wait != ASYNC_CLOSING_WAIT_NONE) {
|
||||
DBGINFO(("%s call tty_wait_until_sent\n", info->device_name));
|
||||
tty_wait_until_sent(tty, info->closing_wait);
|
||||
tty_wait_until_sent(tty, info->port.closing_wait);
|
||||
}
|
||||
|
||||
if (info->port.flags & ASYNC_INITIALIZED)
|
||||
@@ -774,8 +772,8 @@ static void close(struct tty_struct *tty, struct file *filp)
|
||||
info->port.tty = NULL;
|
||||
|
||||
if (info->port.blocked_open) {
|
||||
if (info->close_delay) {
|
||||
msleep_interruptible(jiffies_to_msecs(info->close_delay));
|
||||
if (info->port.close_delay) {
|
||||
msleep_interruptible(jiffies_to_msecs(info->port.close_delay));
|
||||
}
|
||||
wake_up_interruptible(&info->port.open_wait);
|
||||
}
|
||||
@@ -3448,13 +3446,13 @@ static struct slgt_info *alloc_dev(int adapter_num, int port_num, struct pci_dev
|
||||
DBGERR(("%s device alloc failed adapter=%d port=%d\n",
|
||||
driver_name, adapter_num, port_num));
|
||||
} else {
|
||||
tty_port_init(&info->port);
|
||||
info->magic = MGSL_MAGIC;
|
||||
INIT_WORK(&info->task, bh_handler);
|
||||
info->max_frame_size = 4096;
|
||||
info->raw_rx_size = DMABUFSIZE;
|
||||
info->close_delay = 5*HZ/10;
|
||||
info->closing_wait = 30*HZ;
|
||||
tty_port_init(&info->port);
|
||||
info->port.close_delay = 5*HZ/10;
|
||||
info->port.closing_wait = 30*HZ;
|
||||
init_waitqueue_head(&info->status_event_wait_q);
|
||||
init_waitqueue_head(&info->event_wait_q);
|
||||
spin_lock_init(&info->netlock);
|
||||
|
Reference in New Issue
Block a user