]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/isicom.c
tty: The big operations rework
[linux-2.6-omap-h63xx.git] / drivers / char / isicom.c
index 57b115272aaa8ff10df8217b3eb3f6ccf77ccd1a..9c6be8da220c12d56bf5caf24affda8e3cb4515c 100644 (file)
@@ -1140,28 +1140,29 @@ static int isicom_write(struct tty_struct *tty, const unsigned char *buf,
 }
 
 /* put_char et all */
-static void isicom_put_char(struct tty_struct *tty, unsigned char ch)
+static int isicom_put_char(struct tty_struct *tty, unsigned char ch)
 {
        struct isi_port *port = tty->driver_data;
        struct isi_board *card = port->card;
        unsigned long flags;
 
        if (isicom_paranoia_check(port, tty->name, "isicom_put_char"))
-               return;
+               return 0;
 
        if (!port->xmit_buf)
-               return;
+               return 0;
 
        spin_lock_irqsave(&card->card_lock, flags);
-       if (port->xmit_cnt >= SERIAL_XMIT_SIZE - 1)
-               goto out;
+       if (port->xmit_cnt >= SERIAL_XMIT_SIZE - 1) {
+               spin_unlock_irqrestore(&card->card_lock, flags);
+               return 0;
+       }
 
        port->xmit_buf[port->xmit_head++] = ch;
        port->xmit_head &= (SERIAL_XMIT_SIZE - 1);
        port->xmit_cnt++;
        spin_unlock_irqrestore(&card->card_lock, flags);
-out:
-       return;
+       return 1;
 }
 
 /* flush_chars et all */