]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/serial167.c
Fix incorrect use of loose in tty/serial drivers
[linux-2.6-omap-h63xx.git] / drivers / char / serial167.c
index 62d6f2e0fd1881c960fd322ca12f4d75ff1cc22d..a8f15e6be594237f150b1b3e92ad1b9a7d468ae1 100644 (file)
@@ -418,7 +418,7 @@ static irqreturn_t cd2401_rxerr_interrupt(int irq, void *dev_id)
                                                             TTY_OVERRUN);
                                        /*
                                           If the flip buffer itself is
-                                          overflowing, we still loose
+                                          overflowing, we still lose
                                           the next incoming character.
                                         */
                                        if (tty_buffer_request_room(tty, 1) !=
@@ -1060,7 +1060,7 @@ static void config_setup(struct cyclades_port *info)
 
 }                              /* config_setup */
 
-static void cy_put_char(struct tty_struct *tty, unsigned char ch)
+static int cy_put_char(struct tty_struct *tty, unsigned char ch)
 {
        struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
        unsigned long flags;
@@ -1070,21 +1070,22 @@ static void cy_put_char(struct tty_struct *tty, unsigned char ch)
 #endif
 
        if (serial_paranoia_check(info, tty->name, "cy_put_char"))
-               return;
+               return 0;
 
        if (!info->xmit_buf)
-               return;
+               return 0;
 
        local_irq_save(flags);
        if (info->xmit_cnt >= PAGE_SIZE - 1) {
                local_irq_restore(flags);
-               return;
+               return 0;
        }
 
        info->xmit_buf[info->xmit_head++] = ch;
        info->xmit_head &= PAGE_SIZE - 1;
        info->xmit_cnt++;
        local_irq_restore(flags);
+       return 1;
 }                              /* cy_put_char */
 
 static void cy_flush_chars(struct tty_struct *tty)