2006-03-10 16:35:10

by Patrick Gefre

[permalink] [raw]
Subject: [PATCH] 2.6 Altix : small ioc4 oversight....


I shoulda caught this when I reviewed the code for the recent serial
core changes - sorry....

Get rid of the local 'flip' variable and no need to 'trim' the buffer.


Signed-off-by: Patrick Gefre <[email protected]>


ioc4_serial.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)


Index: linux-2.6/drivers/serial/ioc4_serial.c
===================================================================
--- linux-2.6.orig/drivers/serial/ioc4_serial.c 2006-03-09 11:37:31.153784820 -0600
+++ linux-2.6/drivers/serial/ioc4_serial.c 2006-03-09 11:38:36.697103905 -0600
@@ -2301,7 +2301,6 @@
int read_count, request_count = IOC4_MAX_CHARS;
struct uart_icount *icount;
struct uart_info *info = the_port->info;
- int flip = 0;
unsigned long pflags;

/* Make sure all the pointers are "good" ones */
@@ -2313,7 +2312,7 @@
spin_lock_irqsave(&the_port->lock, pflags);
tty = info->tty;

- request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS - 2);
+ request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS);

if (request_count > 0) {
icount = &the_port->icount;
@@ -2326,8 +2325,7 @@

spin_unlock_irqrestore(&the_port->lock, pflags);

- if (flip)
- tty_flip_buffer_push(tty);
+ tty_flip_buffer_push(tty);
}

/**