Skip to content

Commit

Permalink
[PATCH] Altix: small ioc4 oversight
Browse files Browse the repository at this point in the history
Get rid of the local 'flip' variable and no need to 'trim' the buffer.

Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Pat Gefre authored and Linus Torvalds committed Mar 11, 2006
1 parent 341c2d8 commit 27d162e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/serial/ioc4_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,7 +2301,6 @@ static void receive_chars(struct uart_port *the_port)
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 */
Expand All @@ -2313,7 +2312,7 @@ static void receive_chars(struct uart_port *the_port)
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;
Expand All @@ -2326,8 +2325,7 @@ static void receive_chars(struct uart_port *the_port)

spin_unlock_irqrestore(&the_port->lock, pflags);

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

/**
Expand Down

0 comments on commit 27d162e

Please sign in to comment.