X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fserial%2F21285.c;h=facb6785561906dc0b738ed5ca35cbe55946f064;hb=refs%2Fheads%2Fvserver;hp=8c5c276c55771eb297fa756ed2cf23e0159d8fc2;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c index 8c5c276c5..facb67855 100644 --- a/drivers/serial/21285.c +++ b/drivers/serial/21285.c @@ -1,5 +1,5 @@ /* - * linux/drivers/char/21285.c + * linux/drivers/serial/21285.c * * Driver for the serial port on the 21285 StrongArm-110 core logic chip. * @@ -7,7 +7,6 @@ * * $Id: 21285.c,v 1.37 2002/07/28 10:03:27 rmk Exp $ */ -#include #include #include #include @@ -86,7 +85,7 @@ static void serial21285_enable_ms(struct uart_port *port) { } -static irqreturn_t serial21285_rx_chars(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t serial21285_rx_chars(int irq, void *dev_id) { struct uart_port *port = dev_id; struct tty_struct *tty = port->info->tty; @@ -124,7 +123,7 @@ static irqreturn_t serial21285_rx_chars(int irq, void *dev_id, struct pt_regs *r return IRQ_HANDLED; } -static irqreturn_t serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t serial21285_tx_chars(int irq, void *dev_id) { struct uart_port *port = dev_id; struct circ_buf *xmit = &port->info->xmit; @@ -215,8 +214,8 @@ static void serial21285_shutdown(struct uart_port *port) } static void -serial21285_set_termios(struct uart_port *port, struct termios *termios, - struct termios *old) +serial21285_set_termios(struct uart_port *port, struct ktermios *termios, + struct ktermios *old) { unsigned long flags; unsigned int baud, quot, h_lcr; @@ -375,23 +374,18 @@ static void serial21285_setup_ports(void) } #ifdef CONFIG_SERIAL_21285_CONSOLE +static void serial21285_console_putchar(struct uart_port *port, int ch) +{ + while (*CSR_UARTFLG & 0x20) + barrier(); + *CSR_UARTDR = ch; +} static void serial21285_console_write(struct console *co, const char *s, unsigned int count) { - int i; - - for (i = 0; i < count; i++) { - while (*CSR_UARTFLG & 0x20) - barrier(); - *CSR_UARTDR = s[i]; - if (s[i] == '\n') { - while (*CSR_UARTFLG & 0x20) - barrier(); - *CSR_UARTDR = '\r'; - } - } + uart_console_write(&serial21285_port, s, count, serial21285_console_putchar); } static void __init @@ -484,7 +478,6 @@ static struct uart_driver serial21285_reg = { .owner = THIS_MODULE, .driver_name = "ttyFB", .dev_name = "ttyFB", - .devfs_name = "ttyFB", .major = SERIAL_21285_MAJOR, .minor = SERIAL_21285_MINOR, .nr = 1,