aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclink_gt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/synclink_gt.c')
-rw-r--r--drivers/char/synclink_gt.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index fc71d9819165..07aa42a7f397 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -261,8 +261,6 @@ struct slgt_info {
261 struct slgt_info *port_array[SLGT_MAX_PORTS]; 261 struct slgt_info *port_array[SLGT_MAX_PORTS];
262 262
263 int line; /* tty line instance number */ 263 int line; /* tty line instance number */
264 unsigned short close_delay;
265 unsigned short closing_wait; /* time to wait before closing */
266 264
267 struct mgsl_icount icount; 265 struct mgsl_icount icount;
268 266
@@ -758,9 +756,9 @@ static void close(struct tty_struct *tty, struct file *filp)
758 756
759 /* wait for transmit data to clear all layers */ 757 /* wait for transmit data to clear all layers */
760 758
761 if (info->closing_wait != ASYNC_CLOSING_WAIT_NONE) { 759 if (info->port.closing_wait != ASYNC_CLOSING_WAIT_NONE) {
762 DBGINFO(("%s call tty_wait_until_sent\n", info->device_name)); 760 DBGINFO(("%s call tty_wait_until_sent\n", info->device_name));
763 tty_wait_until_sent(tty, info->closing_wait); 761 tty_wait_until_sent(tty, info->port.closing_wait);
764 } 762 }
765 763
766 if (info->port.flags & ASYNC_INITIALIZED) 764 if (info->port.flags & ASYNC_INITIALIZED)
@@ -774,8 +772,8 @@ static void close(struct tty_struct *tty, struct file *filp)
774 info->port.tty = NULL; 772 info->port.tty = NULL;
775 773
776 if (info->port.blocked_open) { 774 if (info->port.blocked_open) {
777 if (info->close_delay) { 775 if (info->port.close_delay) {
778 msleep_interruptible(jiffies_to_msecs(info->close_delay)); 776 msleep_interruptible(jiffies_to_msecs(info->port.close_delay));
779 } 777 }
780 wake_up_interruptible(&info->port.open_wait); 778 wake_up_interruptible(&info->port.open_wait);
781 } 779 }
@@ -3448,13 +3446,13 @@ static struct slgt_info *alloc_dev(int adapter_num, int port_num, struct pci_dev
3448 DBGERR(("%s device alloc failed adapter=%d port=%d\n", 3446 DBGERR(("%s device alloc failed adapter=%d port=%d\n",
3449 driver_name, adapter_num, port_num)); 3447 driver_name, adapter_num, port_num));
3450 } else { 3448 } else {
3449 tty_port_init(&info->port);
3451 info->magic = MGSL_MAGIC; 3450 info->magic = MGSL_MAGIC;
3452 INIT_WORK(&info->task, bh_handler); 3451 INIT_WORK(&info->task, bh_handler);
3453 info->max_frame_size = 4096; 3452 info->max_frame_size = 4096;
3454 info->raw_rx_size = DMABUFSIZE; 3453 info->raw_rx_size = DMABUFSIZE;
3455 info->close_delay = 5*HZ/10; 3454 info->port.close_delay = 5*HZ/10;
3456 info->closing_wait = 30*HZ; 3455 info->port.closing_wait = 30*HZ;
3457 tty_port_init(&info->port);
3458 init_waitqueue_head(&info->status_event_wait_q); 3456 init_waitqueue_head(&info->status_event_wait_q);
3459 init_waitqueue_head(&info->event_wait_q); 3457 init_waitqueue_head(&info->event_wait_q);
3460 spin_lock_init(&info->netlock); 3458 spin_lock_init(&info->netlock);