summaryrefslogtreecommitdiff
path: root/drivers/char/synclink.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-30 00:54:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 08:29:46 -0700
commit55da77899c1472d83452c914fa179d00ea96df65 (patch)
tree2ae215ad812ceb8f453e49ab708fd232795817ff /drivers/char/synclink.c
parent6ae045767b2adae4e8fc054b980326a971ac4c8e (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/synclink.c')
-rw-r--r--drivers/char/synclink.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index dbbd998ae103..4fbfff7a442e 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -2026,10 +2026,11 @@ static void mgsl_change_params(struct mgsl_struct *info)
*
* Return Value: None
*/
-static void mgsl_put_char(struct tty_struct *tty, unsigned char ch)
+static int mgsl_put_char(struct tty_struct *tty, unsigned char ch)
{
struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data;
unsigned long flags;
+ int ret;
if ( debug_level >= DEBUG_LEVEL_INFO ) {
printk( "%s(%d):mgsl_put_char(%d) on %s\n",
@@ -2037,23 +2038,23 @@ static void mgsl_put_char(struct tty_struct *tty, unsigned char ch)
}
if (mgsl_paranoia_check(info, tty->name, "mgsl_put_char"))
- return;
+ return 0;
if (!tty || !info->xmit_buf)
- return;
+ return 0;
spin_lock_irqsave(&info->irq_spinlock,flags);
if ( (info->params.mode == MGSL_MODE_ASYNC ) || !info->tx_active ) {
-
if (info->xmit_cnt < SERIAL_XMIT_SIZE - 1) {
info->xmit_buf[info->xmit_head++] = ch;
info->xmit_head &= SERIAL_XMIT_SIZE-1;
info->xmit_cnt++;
+ ret = 1;
}
}
-
spin_unlock_irqrestore(&info->irq_spinlock,flags);
+ return ret;
} /* end of mgsl_put_char() */