diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2008-05-01 07:35:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-01 11:04:02 -0400 |
commit | 076482307ff1acfe88d5ad1a3fbfbac5cc8d7ad4 (patch) | |
tree | 5896a47b33486965b1e94516b0eef6de13cdb133 /drivers/char | |
parent | 24c03d47d0481ed7b172b398f6c9b7ca1fafb9fa (diff) |
drivers/char/synclink.c: unbreak mgsl_put_char()
Repair the effects of
commit 55da77899c1472d83452c914fa179d00ea96df65
Author: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Wed Apr 30 00:54:07 2008 -0700
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>
drivers/char/synclink_gt.c: In function 'put_char':
drivers/char/synclink_gt.c:919: warning: 'ret' may be used uninitialized in this function
and do some whitespace repair and unneeded-cast-removal in there as well.
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
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')
-rw-r--r-- | drivers/char/synclink.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index 513b7c2f3e26..384464b016a8 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -2028,13 +2028,13 @@ static void mgsl_change_params(struct mgsl_struct *info) | |||
2028 | */ | 2028 | */ |
2029 | static int mgsl_put_char(struct tty_struct *tty, unsigned char ch) | 2029 | static int mgsl_put_char(struct tty_struct *tty, unsigned char ch) |
2030 | { | 2030 | { |
2031 | struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data; | 2031 | struct mgsl_struct *info = tty->driver_data; |
2032 | unsigned long flags; | 2032 | unsigned long flags; |
2033 | int ret; | 2033 | int ret = 0; |
2034 | 2034 | ||
2035 | if ( debug_level >= DEBUG_LEVEL_INFO ) { | 2035 | if (debug_level >= DEBUG_LEVEL_INFO) { |
2036 | printk( "%s(%d):mgsl_put_char(%d) on %s\n", | 2036 | printk("%s(%d):mgsl_put_char(%d) on %s\n", |
2037 | __FILE__,__LINE__,ch,info->device_name); | 2037 | __FILE__, __LINE__, ch, info->device_name); |
2038 | } | 2038 | } |
2039 | 2039 | ||
2040 | if (mgsl_paranoia_check(info, tty->name, "mgsl_put_char")) | 2040 | if (mgsl_paranoia_check(info, tty->name, "mgsl_put_char")) |
@@ -2043,9 +2043,9 @@ static int mgsl_put_char(struct tty_struct *tty, unsigned char ch) | |||
2043 | if (!tty || !info->xmit_buf) | 2043 | if (!tty || !info->xmit_buf) |
2044 | return 0; | 2044 | return 0; |
2045 | 2045 | ||
2046 | spin_lock_irqsave(&info->irq_spinlock,flags); | 2046 | spin_lock_irqsave(&info->irq_spinlock, flags); |
2047 | 2047 | ||
2048 | if ( (info->params.mode == MGSL_MODE_ASYNC ) || !info->tx_active ) { | 2048 | if ((info->params.mode == MGSL_MODE_ASYNC ) || !info->tx_active) { |
2049 | if (info->xmit_cnt < SERIAL_XMIT_SIZE - 1) { | 2049 | if (info->xmit_cnt < SERIAL_XMIT_SIZE - 1) { |
2050 | info->xmit_buf[info->xmit_head++] = ch; | 2050 | info->xmit_buf[info->xmit_head++] = ch; |
2051 | info->xmit_head &= SERIAL_XMIT_SIZE-1; | 2051 | info->xmit_head &= SERIAL_XMIT_SIZE-1; |
@@ -2053,7 +2053,7 @@ static int mgsl_put_char(struct tty_struct *tty, unsigned char ch) | |||
2053 | ret = 1; | 2053 | ret = 1; |
2054 | } | 2054 | } |
2055 | } | 2055 | } |
2056 | spin_unlock_irqrestore(&info->irq_spinlock,flags); | 2056 | spin_unlock_irqrestore(&info->irq_spinlock, flags); |
2057 | return ret; | 2057 | return ret; |
2058 | 2058 | ||
2059 | } /* end of mgsl_put_char() */ | 2059 | } /* end of mgsl_put_char() */ |