diff options
-rw-r--r-- | drivers/char/amiserial.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c index a5f3956a5971..37457e5a4f2b 100644 --- a/drivers/char/amiserial.c +++ b/drivers/char/amiserial.c | |||
@@ -832,33 +832,34 @@ static void change_speed(struct async_struct *info, | |||
832 | local_irq_restore(flags); | 832 | local_irq_restore(flags); |
833 | } | 833 | } |
834 | 834 | ||
835 | static void rs_put_char(struct tty_struct *tty, unsigned char ch) | 835 | static int rs_put_char(struct tty_struct *tty, unsigned char ch) |
836 | { | 836 | { |
837 | struct async_struct *info; | 837 | struct async_struct *info; |
838 | unsigned long flags; | 838 | unsigned long flags; |
839 | 839 | ||
840 | if (!tty) | 840 | if (!tty) |
841 | return; | 841 | return 0; |
842 | 842 | ||
843 | info = tty->driver_data; | 843 | info = tty->driver_data; |
844 | 844 | ||
845 | if (serial_paranoia_check(info, tty->name, "rs_put_char")) | 845 | if (serial_paranoia_check(info, tty->name, "rs_put_char")) |
846 | return; | 846 | return 0; |
847 | 847 | ||
848 | if (!info->xmit.buf) | 848 | if (!info->xmit.buf) |
849 | return; | 849 | return 0; |
850 | 850 | ||
851 | local_irq_save(flags); | 851 | local_irq_save(flags); |
852 | if (CIRC_SPACE(info->xmit.head, | 852 | if (CIRC_SPACE(info->xmit.head, |
853 | info->xmit.tail, | 853 | info->xmit.tail, |
854 | SERIAL_XMIT_SIZE) == 0) { | 854 | SERIAL_XMIT_SIZE) == 0) { |
855 | local_irq_restore(flags); | 855 | local_irq_restore(flags); |
856 | return; | 856 | return 0; |
857 | } | 857 | } |
858 | 858 | ||
859 | info->xmit.buf[info->xmit.head++] = ch; | 859 | info->xmit.buf[info->xmit.head++] = ch; |
860 | info->xmit.head &= SERIAL_XMIT_SIZE-1; | 860 | info->xmit.head &= SERIAL_XMIT_SIZE-1; |
861 | local_irq_restore(flags); | 861 | local_irq_restore(flags); |
862 | return 1; | ||
862 | } | 863 | } |
863 | 864 | ||
864 | static void rs_flush_chars(struct tty_struct *tty) | 865 | static void rs_flush_chars(struct tty_struct *tty) |