Skip to content

Commit

Permalink
[ARM] 21285 serial: fix build error
Browse files Browse the repository at this point in the history
drivers/serial/21285.c: In function 'serial21285_set_termios':
drivers/serial/21285.c:280: error: 'tty' undeclared (first use in this function)
drivers/serial/21285.c:280: error: (Each undeclared identifier is reported only once
drivers/serial/21285.c:280: error: for each function it appears in.)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Feb 4, 2008
1 parent ae9458d commit 2f65baf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/serial/21285.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
quot = uart_get_divisor(port, baud);

if (port->info && port->info->tty) {
struct tty_struct *tty = port->info->tty;
unsigned int b = port->uartclk / (16 * quot);
tty_encode_baud_rate(tty, b, b);
}

switch (termios->c_cflag & CSIZE) {
case CS5:
h_lcr = 0x00;
Expand Down Expand Up @@ -277,8 +283,6 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
if (termios->c_iflag & INPCK)
port->read_status_mask |= RXSTAT_FRAME | RXSTAT_PARITY;

tty_encode_baud_rate(tty, baud, baud);

/*
* Which character status flags should we ignore?
*/
Expand Down

0 comments on commit 2f65baf

Please sign in to comment.