aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2010-02-17 08:07:13 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:43:22 -0500
commit4165fe4ef7305609a96c7f248cefb9c414d0ede5 (patch)
tree3e239b821a4b5365c7e15996d44fbf4726cd7840 /drivers/char
parent638b9648ab51c9c549ff5735d3de519ef6199df3 (diff)
tty: Fix up char drivers request_room usage
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>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/nozomi.c2
-rw-r--r--drivers/char/serial167.c3
-rw-r--r--drivers/char/specialix.c2
3 files changed, 1 insertions, 6 deletions
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index 584910ff725e..a3f32a15fde4 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)
853 goto put; 853 goto put;
854 } 854 }
855 855
856 tty_buffer_request_room(tty, size);
857
858 while (size > 0) { 856 while (size > 0) {
859 read_mem32((u32 *) buf, addr + offset, RECEIVE_BUF_MAX); 857 read_mem32((u32 *) buf, addr + offset, RECEIVE_BUF_MAX);
860 858
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index 452370af95de..986aa606a6b6 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)
658 info->mon.char_max = char_count; 658 info->mon.char_max = char_count;
659 info->mon.char_last = char_count; 659 info->mon.char_last = char_count;
660#endif 660#endif
661 len = tty_buffer_request_room(tty, char_count); 661 while (char_count--) {
662 while (len--) {
663 data = base_addr[CyRDR]; 662 data = base_addr[CyRDR];
664 tty_insert_flip_char(tty, data, TTY_NORMAL); 663 tty_insert_flip_char(tty, data, TTY_NORMAL);
665#ifdef CYCLOM_16Y_HACK 664#ifdef CYCLOM_16Y_HACK
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c
index 268e17f9ec3f..07ac14d949ce 100644
--- a/drivers/char/specialix.c
+++ b/drivers/char/specialix.c
@@ -646,8 +646,6 @@ static void sx_receive(struct specialix_board *bp)
646 dprintk(SX_DEBUG_RX, "port: %p: count: %d\n", port, count); 646 dprintk(SX_DEBUG_RX, "port: %p: count: %d\n", port, count);
647 port->hits[count > 8 ? 9 : count]++; 647 port->hits[count > 8 ? 9 : count]++;
648 648
649 tty_buffer_request_room(tty, count);
650
651 while (count--) 649 while (count--)
652 tty_insert_flip_char(tty, sx_in(bp, CD186x_RDR), TTY_NORMAL); 650 tty_insert_flip_char(tty, sx_in(bp, CD186x_RDR), TTY_NORMAL);
653 tty_flip_buffer_push(tty); 651 tty_flip_buffer_push(tty);