From: Alan Cox <alan@linux.intel.com>
To: greg@kroah.com, linux-serial@vger.kernel.org
Subject: [PATCH 6/6] tty: Fix up char drivers request_room usage
Date: Thu, 18 Feb 2010 16:44:23 +0000 [thread overview]
Message-ID: <20100218164421.31856.68348.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100218164104.31856.89546.stgit@localhost.localdomain>
We can't change them all but quite a few misuse it.
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
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 aee3c0d..1ec3d5c 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);
prev parent reply other threads:[~2010-02-18 17:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-18 16:43 [PATCH 0/6] Clean up tty buffering v page allocation Alan Cox
2010-02-18 16:43 ` [PATCH 1/6] tty: Keep the default buffering to sub-page units Alan Cox
2010-02-18 16:43 ` [PATCH 2/6] tty: Add a function to insert a string of characters with the same flag Alan Cox
2010-02-18 16:44 ` [PATCH 3/6] tty: Prune uses of tty_request_room in the USB layer Alan Cox
2010-02-18 16:44 ` [PATCH 4/6] tty: sort out the request_room handling for whiteheat Alan Cox
2010-02-18 16:44 ` [PATCH 5/6] tty: kill request_room for USB ACM class Alan Cox
2010-02-18 16:44 ` Alan Cox [this message]
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=20100218164421.31856.68348.stgit@localhost.localdomain \
--to=alan@linux.intel.com \
--cc=greg@kroah.com \
--cc=linux-serial@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;
as well as URLs for NNTP newsgroup(s).