diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-04-30 03:54:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:45 -0400 |
commit | 76b25a5509bbafdbfc7d7d6b41a3c64947d59360 (patch) | |
tree | 244786bdb849657dc9ab885c7ac2abb3eb4185d7 /drivers/char/cyclades.c | |
parent | 257afa3cb6beaad60849655cb272d4b9de74cf63 (diff) |
char: switch gs, cyclades and esp to return int for put_char
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/cyclades.c')
-rw-r--r-- | drivers/char/cyclades.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 571e4fab5bfa..b8fb251f80ee 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -2814,7 +2814,7 @@ static int cy_write(struct tty_struct *tty, const unsigned char *buf, int count) | |||
2814 | * done stuffing characters into the driver. If there is no room | 2814 | * done stuffing characters into the driver. If there is no room |
2815 | * in the queue, the character is ignored. | 2815 | * in the queue, the character is ignored. |
2816 | */ | 2816 | */ |
2817 | static void cy_put_char(struct tty_struct *tty, unsigned char ch) | 2817 | static int cy_put_char(struct tty_struct *tty, unsigned char ch) |
2818 | { | 2818 | { |
2819 | struct cyclades_port *info = tty->driver_data; | 2819 | struct cyclades_port *info = tty->driver_data; |
2820 | unsigned long flags; | 2820 | unsigned long flags; |
@@ -2824,15 +2824,15 @@ static void cy_put_char(struct tty_struct *tty, unsigned char ch) | |||
2824 | #endif | 2824 | #endif |
2825 | 2825 | ||
2826 | if (serial_paranoia_check(info, tty->name, "cy_put_char")) | 2826 | if (serial_paranoia_check(info, tty->name, "cy_put_char")) |
2827 | return; | 2827 | return 0; |
2828 | 2828 | ||
2829 | if (!info->xmit_buf) | 2829 | if (!info->xmit_buf) |
2830 | return; | 2830 | return 0; |
2831 | 2831 | ||
2832 | spin_lock_irqsave(&info->card->card_lock, flags); | 2832 | spin_lock_irqsave(&info->card->card_lock, flags); |
2833 | if (info->xmit_cnt >= (int)(SERIAL_XMIT_SIZE - 1)) { | 2833 | if (info->xmit_cnt >= (int)(SERIAL_XMIT_SIZE - 1)) { |
2834 | spin_unlock_irqrestore(&info->card->card_lock, flags); | 2834 | spin_unlock_irqrestore(&info->card->card_lock, flags); |
2835 | return; | 2835 | return 0; |
2836 | } | 2836 | } |
2837 | 2837 | ||
2838 | info->xmit_buf[info->xmit_head++] = ch; | 2838 | info->xmit_buf[info->xmit_head++] = ch; |
@@ -2841,6 +2841,7 @@ static void cy_put_char(struct tty_struct *tty, unsigned char ch) | |||
2841 | info->idle_stats.xmit_bytes++; | 2841 | info->idle_stats.xmit_bytes++; |
2842 | info->idle_stats.xmit_idle = jiffies; | 2842 | info->idle_stats.xmit_idle = jiffies; |
2843 | spin_unlock_irqrestore(&info->card->card_lock, flags); | 2843 | spin_unlock_irqrestore(&info->card->card_lock, flags); |
2844 | return 1; | ||
2844 | } /* cy_put_char */ | 2845 | } /* cy_put_char */ |
2845 | 2846 | ||
2846 | /* | 2847 | /* |