diff options
Diffstat (limited to 'drivers/char/synclink.c')
-rw-r--r-- | drivers/char/synclink.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index 734098f7dfa2..9f14753fada1 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -183,8 +183,6 @@ struct mgsl_struct { | |||
183 | struct tty_port port; | 183 | struct tty_port port; |
184 | int line; | 184 | int line; |
185 | int hw_version; | 185 | int hw_version; |
186 | unsigned short close_delay; | ||
187 | unsigned short closing_wait; /* time to wait before closing */ | ||
188 | 186 | ||
189 | struct mgsl_icount icount; | 187 | struct mgsl_icount icount; |
190 | 188 | ||
@@ -3142,11 +3140,11 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp) | |||
3142 | 3140 | ||
3143 | /* wait for transmit data to clear all layers */ | 3141 | /* wait for transmit data to clear all layers */ |
3144 | 3142 | ||
3145 | if (info->closing_wait != ASYNC_CLOSING_WAIT_NONE) { | 3143 | if (info->port.closing_wait != ASYNC_CLOSING_WAIT_NONE) { |
3146 | if (debug_level >= DEBUG_LEVEL_INFO) | 3144 | if (debug_level >= DEBUG_LEVEL_INFO) |
3147 | printk("%s(%d):mgsl_close(%s) calling tty_wait_until_sent\n", | 3145 | printk("%s(%d):mgsl_close(%s) calling tty_wait_until_sent\n", |
3148 | __FILE__,__LINE__, info->device_name ); | 3146 | __FILE__,__LINE__, info->device_name ); |
3149 | tty_wait_until_sent(tty, info->closing_wait); | 3147 | tty_wait_until_sent(tty, info->port.closing_wait); |
3150 | } | 3148 | } |
3151 | 3149 | ||
3152 | if (info->port.flags & ASYNC_INITIALIZED) | 3150 | if (info->port.flags & ASYNC_INITIALIZED) |
@@ -3162,8 +3160,8 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp) | |||
3162 | info->port.tty = NULL; | 3160 | info->port.tty = NULL; |
3163 | 3161 | ||
3164 | if (info->port.blocked_open) { | 3162 | if (info->port.blocked_open) { |
3165 | if (info->close_delay) { | 3163 | if (info->port.close_delay) { |
3166 | msleep_interruptible(jiffies_to_msecs(info->close_delay)); | 3164 | msleep_interruptible(jiffies_to_msecs(info->port.close_delay)); |
3167 | } | 3165 | } |
3168 | wake_up_interruptible(&info->port.open_wait); | 3166 | wake_up_interruptible(&info->port.open_wait); |
3169 | } | 3167 | } |
@@ -4326,12 +4324,12 @@ static struct mgsl_struct* mgsl_allocate_device(void) | |||
4326 | if (!info) { | 4324 | if (!info) { |
4327 | printk("Error can't allocate device instance data\n"); | 4325 | printk("Error can't allocate device instance data\n"); |
4328 | } else { | 4326 | } else { |
4327 | tty_port_init(&info->port); | ||
4329 | info->magic = MGSL_MAGIC; | 4328 | info->magic = MGSL_MAGIC; |
4330 | INIT_WORK(&info->task, mgsl_bh_handler); | 4329 | INIT_WORK(&info->task, mgsl_bh_handler); |
4331 | info->max_frame_size = 4096; | 4330 | info->max_frame_size = 4096; |
4332 | info->close_delay = 5*HZ/10; | 4331 | info->port.close_delay = 5*HZ/10; |
4333 | info->closing_wait = 30*HZ; | 4332 | info->port.closing_wait = 30*HZ; |
4334 | tty_port_init(&info->port); | ||
4335 | init_waitqueue_head(&info->status_event_wait_q); | 4333 | init_waitqueue_head(&info->status_event_wait_q); |
4336 | init_waitqueue_head(&info->event_wait_q); | 4334 | init_waitqueue_head(&info->event_wait_q); |
4337 | spin_lock_init(&info->irq_spinlock); | 4335 | spin_lock_init(&info->irq_spinlock); |