mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: gregkh@linuxfoundation.org
Cc: alan@linux.intel.com, linux-kernel@vger.kernel.org,
	jirislaby@gmail.com, Samuel Ortiz <samuel@sortiz.org>,
	netdev@vger.kernel.org
Subject: [PATCH 03/24] TTY: ircomm, use close times from tty_port
Date: Mon,  4 Jun 2012 13:35:17 +0200	[thread overview]
Message-ID: <1338809738-18967-4-git-send-email-jslaby@suse.cz> (raw)
In-Reply-To: <1338809738-18967-1-git-send-email-jslaby@suse.cz>

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
---
 include/net/irda/ircomm_tty.h      |    3 ---
 net/irda/ircomm/ircomm_tty.c       |   10 ++++------
 net/irda/ircomm/ircomm_tty_ioctl.c |    4 ++--
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
index 365fa6e..b4184d0 100644
--- a/include/net/irda/ircomm_tty.h
+++ b/include/net/irda/ircomm_tty.h
@@ -101,9 +101,6 @@ struct ircomm_tty_cb {
 	struct timer_list watchdog_timer;
 	struct work_struct  tqueue;
 
-        unsigned short    close_delay;
-        unsigned short    closing_wait; /* time to wait before closing */
-
 	int  open_count;
 	int  blocked_open;	/* # of blocked opens */
 
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index 8eeaa8b..61e0adc 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)
 		INIT_WORK(&self->tqueue, ircomm_tty_do_softint);
 		self->max_header_size = IRCOMM_TTY_HDR_UNINITIALISED;
 		self->max_data_size = IRCOMM_TTY_DATA_UNINITIALISED;
-		self->close_delay = 5*HZ/10;
-		self->closing_wait = 30*HZ;
 
 		/* Init some important stuff */
 		init_timer(&self->watchdog_timer);
@@ -546,8 +544,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
 	 * the line discipline to only process XON/XOFF characters.
 	 */
 	tty->closing = 1;
-	if (self->closing_wait != ASYNC_CLOSING_WAIT_NONE)
-		tty_wait_until_sent_from_close(tty, self->closing_wait);
+	if (self->port.closing_wait != ASYNC_CLOSING_WAIT_NONE)
+		tty_wait_until_sent_from_close(tty, self->port.closing_wait);
 
 	ircomm_tty_shutdown(self);
 
@@ -558,8 +556,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
 	self->tty = NULL;
 
 	if (self->blocked_open) {
-		if (self->close_delay)
-			schedule_timeout_interruptible(self->close_delay);
+		if (self->port.close_delay)
+			schedule_timeout_interruptible(self->port.close_delay);
 		wake_up_interruptible(&self->port.open_wait);
 	}
 
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c
index d0667d6..a6d25e3 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,
 	info.line = self->line;
 	info.flags = self->flags;
 	info.baud_base = self->settings.data_rate;
-	info.close_delay = self->close_delay;
-	info.closing_wait = self->closing_wait;
+	info.close_delay = self->port.close_delay;
+	info.closing_wait = self->port.closing_wait;
 
 	/* For compatibility  */
 	info.type = PORT_16550A;
-- 
1.7.10.3



  parent reply	other threads:[~2012-06-04 11:37 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 11:35 [PATCH 00/25] TTY buffer in tty_port -- prep no. 3 Jiri Slaby
2012-06-04 11:35 ` [PATCH 01/24] TTY: cyclades, add local pointer for card Jiri Slaby
2012-06-04 11:35 ` [PATCH 02/24] TTY: ircomm, add tty_port Jiri Slaby
2012-06-04 11:35 ` Jiri Slaby [this message]
2012-06-04 11:35 ` [PATCH 04/24] TTY: ircomm, use open counts from tty_port Jiri Slaby
2012-06-04 16:36   ` Alan Cox
2012-06-04 11:35 ` [PATCH 05/24] TTY: ircomm, use flags " Jiri Slaby
2012-06-04 11:35 ` [PATCH 06/24] TTY: ircomm, revamp locking Jiri Slaby
2012-06-04 16:57   ` Alan Cox
2012-06-04 11:35 ` [PATCH 07/24] TTY: ircomm, use tty from tty_port Jiri Slaby
2012-06-04 11:35 ` [PATCH 08/24] TTY: ircomm, define local tty_port Jiri Slaby
2012-06-04 11:35 ` [PATCH 09/24] TTY: ircomm, define carrier routines Jiri Slaby
2012-06-04 11:35 ` [PATCH 10/24] TTY: ircomm, use tty_port_close_end helper Jiri Slaby
2012-06-04 11:35 ` [PATCH 11/24] TTY: ircomm, use tty_port_close_start helper Jiri Slaby
2012-06-04 11:35 ` [PATCH 12/24] TTY: um/line, add tty_port Jiri Slaby
2012-06-04 11:35 ` [PATCH 13/24] TTY: um/line, use tty from tty_port Jiri Slaby
2012-06-04 12:01   ` Richard Weinberger
2012-06-04 15:20     ` Jiri Slaby
2012-06-04 15:29       ` Richard Weinberger
2012-06-04 15:41         ` Jiri Slaby
2012-06-04 15:42           ` Richard Weinberger
2012-06-04 16:27             ` [uml-devel] " Boaz Harrosh
2012-06-04 16:29               ` Richard Weinberger
2012-06-04 16:37                 ` Boaz Harrosh
2012-06-04 16:55                 ` Boaz Harrosh
2012-06-04 17:05                   ` Richard Weinberger
2012-06-04 17:14                     ` Boaz Harrosh
2012-06-04 15:58         ` Alan Cox
2012-06-04 11:35 ` [PATCH 14/24] PTY: remove one empty ops->remove Jiri Slaby
2012-06-04 11:35 ` [PATCH 15/24] PTY: merge pty_install implementations Jiri Slaby
2012-06-04 11:35 ` [PATCH 16/24] PTY: add tty_port Jiri Slaby
2012-06-12 22:55   ` Greg KH
2012-06-14  0:29     ` Greg KH
2012-06-14  0:31       ` Greg KH
2012-06-04 11:35 ` [PATCH 17/24] TTY: vt, remove con_schedule_flip Jiri Slaby
2012-06-04 11:35 ` [PATCH 18/24] TTY: provide drivers with tty_port_install Jiri Slaby
2012-06-04 11:35 ` [PATCH 19/24] TTY: vt, add ->install Jiri Slaby
2012-06-04 11:35 ` [PATCH 20/24] TTY: usb-serial, use tty_port_install Jiri Slaby
2012-06-04 11:35 ` [PATCH 21/24] TTY: centralize fail paths in tty_register_driver Jiri Slaby
2012-06-04 11:35 ` [PATCH 22/24] TTY: add ports array to tty_driver Jiri Slaby
2012-06-04 11:35 ` [PATCH 23/24] TTY: add tty_port_register_device helper Jiri Slaby
2012-06-04 11:35 ` [PATCH 24/24] TTY: use tty_port_register_device Jiri Slaby
2012-06-04 17:00   ` Alan Cox
2012-06-09 14:58     ` Jiri Slaby
2012-06-09 17:27       ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1338809738-18967-4-git-send-email-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=alan@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=samuel@sortiz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®