aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-30 03:54:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:46 -0400
commitf2545a75632d18d62aa287b9e5d207255cc8bffc (patch)
tree21f93a2b8a9412fc636e0e8b2cb893294fb5d918
parent5d19f546e7b6f0976f957780f2687c55668f4495 (diff)
isdn: switch to int put_char method
Signed-off-by: Alan Cox <alan@redhat.com> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/isdn/capi/capi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 24c6b7ca62be..6ca0bb949ad3 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1111,11 +1111,12 @@ static int capinc_tty_write(struct tty_struct * tty,
1111 return count; 1111 return count;
1112} 1112}
1113 1113
1114static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch) 1114static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
1115{ 1115{
1116 struct capiminor *mp = (struct capiminor *)tty->driver_data; 1116 struct capiminor *mp = (struct capiminor *)tty->driver_data;
1117 struct sk_buff *skb; 1117 struct sk_buff *skb;
1118 unsigned long flags; 1118 unsigned long flags;
1119 int ret = 1;
1119 1120
1120#ifdef _DEBUG_TTYFUNCS 1121#ifdef _DEBUG_TTYFUNCS
1121 printk(KERN_DEBUG "capinc_put_char(%u)\n", ch); 1122 printk(KERN_DEBUG "capinc_put_char(%u)\n", ch);
@@ -1125,7 +1126,7 @@ static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
1125#ifdef _DEBUG_TTYFUNCS 1126#ifdef _DEBUG_TTYFUNCS
1126 printk(KERN_DEBUG "capinc_tty_put_char: mp or mp->ncci NULL\n"); 1127 printk(KERN_DEBUG "capinc_tty_put_char: mp or mp->ncci NULL\n");
1127#endif 1128#endif
1128 return; 1129 return 0;
1129 } 1130 }
1130 1131
1131 spin_lock_irqsave(&workaround_lock, flags); 1132 spin_lock_irqsave(&workaround_lock, flags);
@@ -1134,7 +1135,7 @@ static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
1134 if (skb_tailroom(skb) > 0) { 1135 if (skb_tailroom(skb) > 0) {
1135 *(skb_put(skb, 1)) = ch; 1136 *(skb_put(skb, 1)) = ch;
1136 spin_unlock_irqrestore(&workaround_lock, flags); 1137 spin_unlock_irqrestore(&workaround_lock, flags);
1137 return; 1138 return 1;
1138 } 1139 }
1139 mp->ttyskb = NULL; 1140 mp->ttyskb = NULL;
1140 skb_queue_tail(&mp->outqueue, skb); 1141 skb_queue_tail(&mp->outqueue, skb);
@@ -1148,8 +1149,10 @@ static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
1148 mp->ttyskb = skb; 1149 mp->ttyskb = skb;
1149 } else { 1150 } else {
1150 printk(KERN_ERR "capinc_put_char: char %u lost\n", ch); 1151 printk(KERN_ERR "capinc_put_char: char %u lost\n", ch);
1152 ret = 0;
1151 } 1153 }
1152 spin_unlock_irqrestore(&workaround_lock, flags); 1154 spin_unlock_irqrestore(&workaround_lock, flags);
1155 return ret;
1153} 1156}
1154 1157
1155static void capinc_tty_flush_chars(struct tty_struct *tty) 1158static void capinc_tty_flush_chars(struct tty_struct *tty)