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/generic_serial.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/generic_serial.c')
-rw-r--r-- | drivers/char/generic_serial.c | 11 |
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; | |||
48 | module_param(gs_debug, int, 0644); | 48 | module_param(gs_debug, int, 0644); |
49 | 49 | ||
50 | 50 | ||
51 | void gs_put_char(struct tty_struct * tty, unsigned char ch) | 51 | int gs_put_char(struct tty_struct * tty, unsigned char ch) |
52 | { | 52 | { |
53 | struct gs_port *port; | 53 | struct gs_port *port; |
54 | 54 | ||
55 | func_enter (); | 55 | func_enter (); |
56 | 56 | ||
57 | if (!tty) return; | 57 | if (!tty) return 0; |
58 | 58 | ||
59 | port = tty->driver_data; | 59 | port = tty->driver_data; |
60 | 60 | ||
61 | if (!port) return; | 61 | if (!port) return 0; |
62 | 62 | ||
63 | if (! (port->flags & ASYNC_INITIALIZED)) return; | 63 | if (! (port->flags & ASYNC_INITIALIZED)) return 0; |
64 | 64 | ||
65 | /* Take a lock on the serial tranmit buffer! */ | 65 | /* Take a lock on the serial tranmit buffer! */ |
66 | mutex_lock(& port->port_write_mutex); | 66 | mutex_lock(& port->port_write_mutex); |
@@ -68,7 +68,7 @@ void gs_put_char(struct tty_struct * tty, unsigned char ch) | |||
68 | if (port->xmit_cnt >= SERIAL_XMIT_SIZE - 1) { | 68 | if (port->xmit_cnt >= SERIAL_XMIT_SIZE - 1) { |
69 | /* Sorry, buffer is full, drop character. Update statistics???? -- REW */ | 69 | /* Sorry, buffer is full, drop character. Update statistics???? -- REW */ |
70 | mutex_unlock(&port->port_write_mutex); | 70 | mutex_unlock(&port->port_write_mutex); |
71 | return; | 71 | return 0; |
72 | } | 72 | } |
73 | 73 | ||
74 | port->xmit_buf[port->xmit_head++] = ch; | 74 | port->xmit_buf[port->xmit_head++] = ch; |
@@ -77,6 +77,7 @@ void gs_put_char(struct tty_struct * tty, unsigned char ch) | |||
77 | 77 | ||
78 | mutex_unlock(&port->port_write_mutex); | 78 | mutex_unlock(&port->port_write_mutex); |
79 | func_exit (); | 79 | func_exit (); |
80 | return 1; | ||
80 | } | 81 | } |
81 | 82 | ||
82 | 83 | ||