summaryrefslogtreecommitdiffstats
path: root/drivers/char/generic_serial.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/generic_serial.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/generic_serial.c')
-rw-r--r--drivers/char/generic_serial.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c
index f6610f28d657..149518e22fa6 100644
--- a/drivers/char/generic_serial.c
+++ b/drivers/char/generic_serial.c
@@ -48,19 +48,19 @@ static int gs_debug;
module_param(gs_debug, int, 0644);
-void gs_put_char(struct tty_struct * tty, unsigned char ch)
+int gs_put_char(struct tty_struct * tty, unsigned char ch)
{
struct gs_port *port;
func_enter ();
- if (!tty) return;
+ if (!tty) return 0;
port = tty->driver_data;
- if (!port) return;
+ if (!port) return 0;
- if (! (port->flags & ASYNC_INITIALIZED)) return;
+ if (! (port->flags & ASYNC_INITIALIZED)) return 0;
/* Take a lock on the serial tranmit buffer! */
mutex_lock(& port->port_write_mutex);
@@ -68,7 +68,7 @@ void gs_put_char(struct tty_struct * tty, unsigned char ch)
if (port->xmit_cnt >= SERIAL_XMIT_SIZE - 1) {
/* Sorry, buffer is full, drop character. Update statistics???? -- REW */
mutex_unlock(&port->port_write_mutex);
- return;
+ return 0;
}
port->xmit_buf[port->xmit_head++] = ch;
@@ -77,6 +77,7 @@ void gs_put_char(struct tty_struct * tty, unsigned char ch)
mutex_unlock(&port->port_write_mutex);
func_exit ();
+ return 1;
}
OpenPOWER on IntegriCloud