Skip to content

Commit 2a0213c

Browse files
Jiri Slabygregkh
authored andcommitted
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>
1 parent a3cc9fc commit 2a0213c

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

‎include/net/irda/ircomm_tty.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ struct ircomm_tty_cb {
101101
struct timer_list watchdog_timer;
102102
struct work_struct tqueue;
103103

104-
unsigned short close_delay;
105-
unsigned short closing_wait; /* time to wait before closing */
106-
107104
int open_count;
108105
int blocked_open; /* # of blocked opens */
109106

‎net/irda/ircomm/ircomm_tty.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,6 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
389389
INIT_WORK(&self->tqueue, ircomm_tty_do_softint);
390390
self->max_header_size = IRCOMM_TTY_HDR_UNINITIALISED;
391391
self->max_data_size = IRCOMM_TTY_DATA_UNINITIALISED;
392-
self->close_delay = 5*HZ/10;
393-
self->closing_wait = 30*HZ;
394392

395393
/* Init some important stuff */
396394
init_timer(&self->watchdog_timer);
@@ -546,8 +544,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
546544
* the line discipline to only process XON/XOFF characters.
547545
*/
548546
tty->closing = 1;
549-
if (self->closing_wait != ASYNC_CLOSING_WAIT_NONE)
550-
tty_wait_until_sent_from_close(tty, self->closing_wait);
547+
if (self->port.closing_wait != ASYNC_CLOSING_WAIT_NONE)
548+
tty_wait_until_sent_from_close(tty, self->port.closing_wait);
551549

552550
ircomm_tty_shutdown(self);
553551

@@ -558,8 +556,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
558556
self->tty = NULL;
559557

560558
if (self->blocked_open) {
561-
if (self->close_delay)
562-
schedule_timeout_interruptible(self->close_delay);
559+
if (self->port.close_delay)
560+
schedule_timeout_interruptible(self->port.close_delay);
563561
wake_up_interruptible(&self->port.open_wait);
564562
}
565563

‎net/irda/ircomm/ircomm_tty_ioctl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self,
272272
info.line = self->line;
273273
info.flags = self->flags;
274274
info.baud_base = self->settings.data_rate;
275-
info.close_delay = self->close_delay;
276-
info.closing_wait = self->closing_wait;
275+
info.close_delay = self->port.close_delay;
276+
info.closing_wait = self->port.closing_wait;
277277

278278
/* For compatibility */
279279
info.type = PORT_16550A;

0 commit comments

Comments
 (0)