X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fserial%2Fsa1100.c;h=91d208755a6ad5722eca243bf2e4d0ac9690f0f6;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=b60c5b60484c7ec0fb3496ae9e39906ac5f32131;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c index b60c5b604..91d208755 100644 --- a/drivers/serial/sa1100.c +++ b/drivers/serial/sa1100.c @@ -25,26 +25,27 @@ * */ #include + +#if defined(CONFIG_SERIAL_SA1100_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) +#define SUPPORT_SYSRQ +#endif + #include -#include #include #include -#include #include #include #include +#include +#include +#include +#include #include #include #include #include -#if defined(CONFIG_SERIAL_SA1100_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - -#include - /* We've been assigned a range on the "Low-density serial ports" major */ #define SERIAL_SA1100_MAJOR 204 #define MINOR_START 5 @@ -220,9 +221,7 @@ sa1100_rx_chars(struct sa1100_port *sport, struct pt_regs *regs) goto ignore_char; error_return: - *tty->flip.flag_buf_ptr++ = flg; - *tty->flip.char_buf_ptr++ = ch; - tty->flip.count++; + tty_insert_flip_char(tty, ch, flg); ignore_char: status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) | UTSR0_TO_SM(UART_GET_UTSR0(sport)); @@ -257,11 +256,7 @@ sa1100_rx_chars(struct sa1100_port *sport, struct pt_regs *regs) * overrun does *not* affect the character * we read from the FIFO */ - *tty->flip.flag_buf_ptr++ = flg; - *tty->flip.char_buf_ptr++ = ch; - tty->flip.count++; - if (tty->flip.count >= TTY_FLIPBUF_SIZE) - goto ignore_char; + tty_insert_flip_char(tty, ch, flg); ch = 0; flg = TTY_OVERRUN; }