aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/serial167.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index 62d6f2e0fd18..fd2db07a50fc 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -1060,7 +1060,7 @@ static void config_setup(struct cyclades_port *info)
1060 1060
1061} /* config_setup */ 1061} /* config_setup */
1062 1062
1063static void cy_put_char(struct tty_struct *tty, unsigned char ch) 1063static int cy_put_char(struct tty_struct *tty, unsigned char ch)
1064{ 1064{
1065 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; 1065 struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
1066 unsigned long flags; 1066 unsigned long flags;
@@ -1070,7 +1070,7 @@ static void cy_put_char(struct tty_struct *tty, unsigned char ch)
1070#endif 1070#endif
1071 1071
1072 if (serial_paranoia_check(info, tty->name, "cy_put_char")) 1072 if (serial_paranoia_check(info, tty->name, "cy_put_char"))
1073 return; 1073 return 0;
1074 1074
1075 if (!info->xmit_buf) 1075 if (!info->xmit_buf)
1076 return; 1076 return;
@@ -1078,13 +1078,14 @@ static void cy_put_char(struct tty_struct *tty, unsigned char ch)
1078 local_irq_save(flags); 1078 local_irq_save(flags);
1079 if (info->xmit_cnt >= PAGE_SIZE - 1) { 1079 if (info->xmit_cnt >= PAGE_SIZE - 1) {
1080 local_irq_restore(flags); 1080 local_irq_restore(flags);
1081 return; 1081 return 0;
1082 } 1082 }
1083 1083
1084 info->xmit_buf[info->xmit_head++] = ch; 1084 info->xmit_buf[info->xmit_head++] = ch;
1085 info->xmit_head &= PAGE_SIZE - 1; 1085 info->xmit_head &= PAGE_SIZE - 1;
1086 info->xmit_cnt++; 1086 info->xmit_cnt++;
1087 local_irq_restore(flags); 1087 local_irq_restore(flags);
1088 return 1;
1088} /* cy_put_char */ 1089} /* cy_put_char */
1089 1090
1090static void cy_flush_chars(struct tty_struct *tty) 1091static void cy_flush_chars(struct tty_struct *tty)