public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Alan Cox <alan@linux.intel.com>, Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 32/36] tty: Fix up char drivers request_room usage
Date: Tue,  2 Mar 2010 15:36:39 -0800	[thread overview]
Message-ID: <1267573003-782-32-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20100302230956.GC32287@kroah.com>

From: Alan Cox <alan@linux.intel.com>

We can't change them all but quite a few misuse it.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/nozomi.c        |    2 --
 drivers/char/serial167.c     |    3 +--
 drivers/char/specialix.c     |    2 --
 drivers/serial/icom.c        |    1 -
 drivers/serial/ioc3_serial.c |    3 +--
 5 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index 584910f..a3f32a1 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -853,8 +853,6 @@ static int receive_data(enum port_type index, struct nozomi *dc)
 		goto put;
 	}
 
-	tty_buffer_request_room(tty, size);
-
 	while (size > 0) {
 		read_mem32((u32 *) buf, addr + offset, RECEIVE_BUF_MAX);
 
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index 452370a..986aa60 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -658,8 +658,7 @@ static irqreturn_t cd2401_rx_interrupt(int irq, void *dev_id)
 			info->mon.char_max = char_count;
 		info->mon.char_last = char_count;
 #endif
-		len = tty_buffer_request_room(tty, char_count);
-		while (len--) {
+		while (char_count--) {
 			data = base_addr[CyRDR];
 			tty_insert_flip_char(tty, data, TTY_NORMAL);
 #ifdef CYCLOM_16Y_HACK
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c
index 268e17f..07ac14d 100644
--- a/drivers/char/specialix.c
+++ b/drivers/char/specialix.c
@@ -646,8 +646,6 @@ static void sx_receive(struct specialix_board *bp)
 	dprintk(SX_DEBUG_RX, "port: %p: count: %d\n", port, count);
 	port->hits[count > 8 ? 9 : count]++;
 
-	tty_buffer_request_room(tty, count);
-
 	while (count--)
 		tty_insert_flip_char(tty, sx_in(bp, CD186x_RDR), TTY_NORMAL);
 	tty_flip_buffer_push(tty);
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 6e715b7..53a4682 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -751,7 +751,6 @@ static void recv_interrupt(u16 port_int_reg, struct icom_port *icom_port)
 		trace(icom_port, "FID_STATUS", status);
 		count = cpu_to_le16(icom_port->statStg->rcv[rcv_buff].leLength);
 
-                count = tty_buffer_request_room(tty, count);
 		trace(icom_port, "RCV_COUNT", count);
 
 		trace(icom_port, "REAL_COUNT", count);
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c
index 85dc041..23ba6b4 100644
--- a/drivers/serial/ioc3_serial.c
+++ b/drivers/serial/ioc3_serial.c
@@ -1411,8 +1411,7 @@ static int receive_chars(struct uart_port *the_port)
 	read_count = do_read(the_port, ch, MAX_CHARS);
 	if (read_count > 0) {
 		flip = 1;
-		read_room = tty_buffer_request_room(tty, read_count);
-		tty_insert_flip_string(tty, ch, read_room);
+		read_room = tty_insert_flip_string(tty, ch, read_count);
 		the_port->icount.rx += read_count;
 	}
 	spin_unlock_irqrestore(&the_port->lock, pflags);
-- 
1.7.0.1


  parent reply	other threads:[~2010-03-02 23:37 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 23:09 [GIT PATCH] TTY patches for 2.6.33-git Greg KH
2010-03-02 23:36 ` [PATCH 01/36] serial: fit blackfin uart over sport driver into common uart infrastructure Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 02/36] serial: copy UART properties of UPF_FIXED_TYPE ports provisioned using early_serial_setup Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 03/36] serial: 68328serial.c: remove BAUD_TABLE_SIZE macro Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 04/36] serial: atmel_serial: add poll_get_char and poll_put_char uart_ops Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 05/36] serial: synclink_gt: dropped transmit data bugfix Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 06/36] serial: 8250_pci: add support for MCS9865 / SYBA 6x Serial Port Card Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 07/36] serial: imx: fix NULL dereference Oops when pdata == NULL Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 08/36] serial: add support for Korenix JetCard Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 09/36] serial: fix test of unsigned Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 10/36] serial: Char: cyclades, fix compiler warning Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 11/36] serial: cyclades: allow overriding ISA defaults also when the driver is built-in Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 12/36] tty: char: mxser, remove unnecessary tty test Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 13/36] serial: isicom.c: use pr_fmt and pr_<level> Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 14/36] hvc_console: fix test on unsigned in hvc_console_print() Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 15/36] tty: moxa: remove #ifdef MODULE completely Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 16/36] ip2: remove #ifdef MODULE from ip2main.c Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 17/36] ip2: Add module parameter Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 18/36] tty: declare MODULE_FIRMWARE in various drivers Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 19/36] Char: synclink, remove unnecessary checks Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 20/36] serial: bfin_5xx: remove useless gpio handling with hard flow control Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 21/36] serial: bfin_5xx: need to disable DMA TX interrupt too Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 22/36] serial: bfin_5xx: kgdboc should accept gdb break only when it is active Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 23/36] serial: bfin_5xx: pull in linux/io.h for ioremap prototypes Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 24/36] serial: bcm63xx_uart: don't use kfree() on non kmalloced area Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 25/36] serial: bcm63xx_uart: allow more than one uart to be registered Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 26/36] sdio_uart: Use kfifo instead of the messy circ stuff Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 27/36] nozomi: Add tty_port usage Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 28/36] nozomi: Fix mutex handling Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 29/36] nozomi: Tidy up the PCI table Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 30/36] serial: timberdale: Remove dependancies Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 31/36] tty: Fix the ldisc hangup race Greg Kroah-Hartman
2010-03-02 23:36 ` Greg Kroah-Hartman [this message]
2010-03-02 23:36 ` [PATCH 33/36] tty: Keep the default buffering to sub-page units Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 35/36] jsm: removing the uart structure and filename on error Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 36/36] jsm: fixing error if the driver fails to load Greg Kroah-Hartman

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=1267573003-782-32-git-send-email-gregkh@suse.de \
    --to=gregkh@suse.de \
    --cc=alan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.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