diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-04-30 03:54:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:45 -0400 |
commit | 257afa3cb6beaad60849655cb272d4b9de74cf63 (patch) | |
tree | 8c1620cab6a6da7f397b796dc2fc4176dc2d3940 /drivers/char | |
parent | 4cd55ab1f991e4d4f3551a711f0f87441a57cd1b (diff) |
amiserial: Switch put char to return success/fail
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-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 a5f3956a597..37457e5a4f2 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) |