aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-06-04 07:35:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-12 18:50:23 -0400
commit2a0213cb1e1ca6b2838595b0d70f09ecc4953ba9 (patch)
tree800224a7ad6fe994d8a6fb30c5edb5fbd9fa4568
parenta3cc9fcff84c4c8aaecda2420acd89a1418d57e9 (diff)
TTY: ircomm, use close times from tty_port
Switch to tty_port->close_delay and closing_wait. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--include/net/irda/ircomm_tty.h3
-rw-r--r--net/irda/ircomm/ircomm_tty.c10
-rw-r--r--net/irda/ircomm/ircomm_tty_ioctl.c4
3 files changed, 6 insertions, 11 deletions
diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
index 365fa6ec5298..b4184d089cc4 100644
--- a/include/net/irda/ircomm_tty.h
+++ b/include/net/irda/ircomm_tty.h
@@ -101,9 +101,6 @@ struct ircomm_tty_cb {
101 struct timer_list watchdog_timer; 101 struct timer_list watchdog_timer;
102 struct work_struct tqueue; 102 struct work_struct tqueue;
103 103
104 unsigned short close_delay;
105 unsigned short closing_wait; /* time to wait before closing */
106
107 int open_count; 104 int open_count;
108 int blocked_open; /* # of blocked opens */ 105 int blocked_open; /* # of blocked opens */
109 106
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index 8eeaa8b7f4a6..61e0adcab964 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -389,8 +389,6 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
389 INIT_WORK(&self->tqueue, ircomm_tty_do_softint); 389 INIT_WORK(&self->tqueue, ircomm_tty_do_softint);
390 self->max_header_size = IRCOMM_TTY_HDR_UNINITIALISED; 390 self->max_header_size = IRCOMM_TTY_HDR_UNINITIALISED;
391 self->max_data_size = IRCOMM_TTY_DATA_UNINITIALISED; 391 self->max_data_size = IRCOMM_TTY_DATA_UNINITIALISED;
392 self->close_delay = 5*HZ/10;
393 self->closing_wait = 30*HZ;
394 392
395 /* Init some important stuff */ 393 /* Init some important stuff */
396 init_timer(&self->watchdog_timer); 394 init_timer(&self->watchdog_timer);
@@ -546,8 +544,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
546 * the line discipline to only process XON/XOFF characters. 544 * the line discipline to only process XON/XOFF characters.
547 */ 545 */
548 tty->closing = 1; 546 tty->closing = 1;
549 if (self->closing_wait != ASYNC_CLOSING_WAIT_NONE) 547 if (self->port.closing_wait != ASYNC_CLOSING_WAIT_NONE)
550 tty_wait_until_sent_from_close(tty, self->closing_wait); 548 tty_wait_until_sent_from_close(tty, self->port.closing_wait);
551 549
552 ircomm_tty_shutdown(self); 550 ircomm_tty_shutdown(self);
553 551
@@ -558,8 +556,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
558 self->tty = NULL; 556 self->tty = NULL;
559 557
560 if (self->blocked_open) { 558 if (self->blocked_open) {
561 if (self->close_delay) 559 if (self->port.close_delay)
562 schedule_timeout_interruptible(self->close_delay); 560 schedule_timeout_interruptible(self->port.close_delay);
563 wake_up_interruptible(&self->port.open_wait); 561 wake_up_interruptible(&self->port.open_wait);
564 } 562 }
565 563
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c
index d0667d68351d..a6d25e37b6b2 100644
--- a/net/irda/ircomm/ircomm_tty_ioctl.c
+++ b/net/irda/ircomm/ircomm_tty_ioctl.c
@@ -272,8 +272,8 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self,
272 info.line = self->line; 272 info.line = self->line;
273 info.flags = self->flags; 273 info.flags = self->flags;
274 info.baud_base = self->settings.data_rate; 274 info.baud_base = self->settings.data_rate;
275 info.close_delay = self->close_delay; 275 info.close_delay = self->port.close_delay;
276 info.closing_wait = self->closing_wait; 276 info.closing_wait = self->port.closing_wait;
277 277
278 /* For compatibility */ 278 /* For compatibility */
279 info.type = PORT_16550A; 279 info.type = PORT_16550A;