summaryrefslogtreecommitdiffstats
path: root/drivers/char/esp.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-30 00:54:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 08:29:45 -0700
commit76b25a5509bbafdbfc7d7d6b41a3c64947d59360 (patch)
tree244786bdb849657dc9ab885c7ac2abb3eb4185d7 /drivers/char/esp.c
parent257afa3cb6beaad60849655cb272d4b9de74cf63 (diff)
downloadblackbird-op-linux-76b25a5509bbafdbfc7d7d6b41a3c64947d59360.tar.gz
blackbird-op-linux-76b25a5509bbafdbfc7d7d6b41a3c64947d59360.zip
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/esp.c')
-rw-r--r--drivers/char/esp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index b1f92db31331..996d3230c929 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -1156,24 +1156,27 @@ static void change_speed(struct esp_struct *info)
spin_unlock_irqrestore(&info->lock, flags);
}
-static void rs_put_char(struct tty_struct *tty, unsigned char ch)
+static int rs_put_char(struct tty_struct *tty, unsigned char ch)
{
struct esp_struct *info = (struct esp_struct *)tty->driver_data;
unsigned long flags;
+ int ret = 0;
if (serial_paranoia_check(info, tty->name, "rs_put_char"))
- return;
+ return 0;
if (!info->xmit_buf)
- return;
+ return 0;
spin_lock_irqsave(&info->lock, flags);
if (info->xmit_cnt < ESP_XMIT_SIZE - 1) {
info->xmit_buf[info->xmit_head++] = ch;
info->xmit_head &= ESP_XMIT_SIZE-1;
info->xmit_cnt++;
+ ret = 1;
}
spin_unlock_irqrestore(&info->lock, flags);
+ return ret;
}
static void rs_flush_chars(struct tty_struct *tty)
OpenPOWER on IntegriCloud