diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-04-30 03:54:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:46 -0400 |
commit | 55da77899c1472d83452c914fa179d00ea96df65 (patch) | |
tree | 2ae215ad812ceb8f453e49ab708fd232795817ff /drivers/char/synclinkmp.c | |
parent | 6ae045767b2adae4e8fc054b980326a971ac4c8e (diff) |
synclink series: switch to int put_char method
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Paul Fulghum <paulkf@microgate.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/synclinkmp.c')
-rw-r--r-- | drivers/char/synclinkmp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index 2f1988c48ee3..a624ffd7baaa 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -519,7 +519,7 @@ static void hangup(struct tty_struct *tty); | |||
519 | static void set_termios(struct tty_struct *tty, struct ktermios *old_termios); | 519 | static void set_termios(struct tty_struct *tty, struct ktermios *old_termios); |
520 | 520 | ||
521 | static int write(struct tty_struct *tty, const unsigned char *buf, int count); | 521 | static int write(struct tty_struct *tty, const unsigned char *buf, int count); |
522 | static void put_char(struct tty_struct *tty, unsigned char ch); | 522 | static int put_char(struct tty_struct *tty, unsigned char ch); |
523 | static void send_xchar(struct tty_struct *tty, char ch); | 523 | static void send_xchar(struct tty_struct *tty, char ch); |
524 | static void wait_until_sent(struct tty_struct *tty, int timeout); | 524 | static void wait_until_sent(struct tty_struct *tty, int timeout); |
525 | static int write_room(struct tty_struct *tty); | 525 | static int write_room(struct tty_struct *tty); |
@@ -1045,10 +1045,11 @@ cleanup: | |||
1045 | 1045 | ||
1046 | /* Add a character to the transmit buffer. | 1046 | /* Add a character to the transmit buffer. |
1047 | */ | 1047 | */ |
1048 | static void put_char(struct tty_struct *tty, unsigned char ch) | 1048 | static int put_char(struct tty_struct *tty, unsigned char ch) |
1049 | { | 1049 | { |
1050 | SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; | 1050 | SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; |
1051 | unsigned long flags; | 1051 | unsigned long flags; |
1052 | int ret = 0; | ||
1052 | 1053 | ||
1053 | if ( debug_level >= DEBUG_LEVEL_INFO ) { | 1054 | if ( debug_level >= DEBUG_LEVEL_INFO ) { |
1054 | printk( "%s(%d):%s put_char(%d)\n", | 1055 | printk( "%s(%d):%s put_char(%d)\n", |
@@ -1056,10 +1057,10 @@ static void put_char(struct tty_struct *tty, unsigned char ch) | |||
1056 | } | 1057 | } |
1057 | 1058 | ||
1058 | if (sanity_check(info, tty->name, "put_char")) | 1059 | if (sanity_check(info, tty->name, "put_char")) |
1059 | return; | 1060 | return 0; |
1060 | 1061 | ||
1061 | if (!info->tx_buf) | 1062 | if (!info->tx_buf) |
1062 | return; | 1063 | return 0; |
1063 | 1064 | ||
1064 | spin_lock_irqsave(&info->lock,flags); | 1065 | spin_lock_irqsave(&info->lock,flags); |
1065 | 1066 | ||
@@ -1071,10 +1072,12 @@ static void put_char(struct tty_struct *tty, unsigned char ch) | |||
1071 | if (info->tx_put >= info->max_frame_size) | 1072 | if (info->tx_put >= info->max_frame_size) |
1072 | info->tx_put -= info->max_frame_size; | 1073 | info->tx_put -= info->max_frame_size; |
1073 | info->tx_count++; | 1074 | info->tx_count++; |
1075 | ret = 1; | ||
1074 | } | 1076 | } |
1075 | } | 1077 | } |
1076 | 1078 | ||
1077 | spin_unlock_irqrestore(&info->lock,flags); | 1079 | spin_unlock_irqrestore(&info->lock,flags); |
1080 | return ret; | ||
1078 | } | 1081 | } |
1079 | 1082 | ||
1080 | /* Send a high-priority XON/XOFF character | 1083 | /* Send a high-priority XON/XOFF character |