Commit a5b08c66 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

serial167: switch to int put_char method

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bbbbb96f
...@@ -1060,7 +1060,7 @@ static void config_setup(struct cyclades_port *info) ...@@ -1060,7 +1060,7 @@ static void config_setup(struct cyclades_port *info)
} /* config_setup */ } /* 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; struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
unsigned long flags; unsigned long flags;
...@@ -1070,7 +1070,7 @@ static void cy_put_char(struct tty_struct *tty, unsigned char ch) ...@@ -1070,7 +1070,7 @@ static void cy_put_char(struct tty_struct *tty, unsigned char ch)
#endif #endif
if (serial_paranoia_check(info, tty->name, "cy_put_char")) if (serial_paranoia_check(info, tty->name, "cy_put_char"))
return; return 0;
if (!info->xmit_buf) if (!info->xmit_buf)
return; return;
...@@ -1078,13 +1078,14 @@ static void cy_put_char(struct tty_struct *tty, unsigned char ch) ...@@ -1078,13 +1078,14 @@ static void cy_put_char(struct tty_struct *tty, unsigned char ch)
local_irq_save(flags); local_irq_save(flags);
if (info->xmit_cnt >= PAGE_SIZE - 1) { if (info->xmit_cnt >= PAGE_SIZE - 1) {
local_irq_restore(flags); local_irq_restore(flags);
return; return 0;
} }
info->xmit_buf[info->xmit_head++] = ch; info->xmit_buf[info->xmit_head++] = ch;
info->xmit_head &= PAGE_SIZE - 1; info->xmit_head &= PAGE_SIZE - 1;
info->xmit_cnt++; info->xmit_cnt++;
local_irq_restore(flags); local_irq_restore(flags);
return 1;
} /* cy_put_char */ } /* cy_put_char */
static void cy_flush_chars(struct tty_struct *tty) static void cy_flush_chars(struct tty_struct *tty)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment