diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-04-30 03:54:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:46 -0400 |
commit | a5b08c66194fba02a865b397579b7204688bcb1e (patch) | |
tree | a140b9c3bdb70f30160d6b7267c39e3a3635797d /drivers/char/serial167.c | |
parent | bbbbb96f5ea84971545ecae5a9ec50387cd9c6a3 (diff) |
serial167: switch to int put_char method
Signed-off-by: Alan 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/serial167.c')
-rw-r--r-- | drivers/char/serial167.c | 7 |
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 | ||
1063 | static void cy_put_char(struct tty_struct *tty, unsigned char ch) | 1063 | static 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 | ||
1090 | static void cy_flush_chars(struct tty_struct *tty) | 1091 | static void cy_flush_chars(struct tty_struct *tty) |