From: Alan Cox Date: Wed, 30 Apr 2008 07:54:05 +0000 (-0700) Subject: serial167: switch to int put_char method X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a5b08c66194fba02a865b397579b7204688bcb1e;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git serial167: switch to int put_char method Signed-off-by: Alan Cox Cc: Jiri Slaby Cc: Jeff Dike Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index 62d6f2e0fd1..fd2db07a50f 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c @@ -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,7 +1070,7 @@ 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; @@ -1078,13 +1078,14 @@ static void cy_put_char(struct tty_struct *tty, unsigned char ch) 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)