Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95229
b: refs/heads/master
c: f2545a7
h: refs/heads/master
i:
  95227: 2e79544
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Apr 30, 2008
1 parent 538e3a9 commit 3032732
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d19f546e7b6f0976f957780f2687c55668f4495
refs/heads/master: f2545a75632d18d62aa287b9e5d207255cc8bffc
9 changes: 6 additions & 3 deletions trunk/drivers/isdn/capi/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,11 +1111,12 @@ static int capinc_tty_write(struct tty_struct * tty,
return count;
}

static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
{
struct capiminor *mp = (struct capiminor *)tty->driver_data;
struct sk_buff *skb;
unsigned long flags;
int ret = 1;

#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_put_char(%u)\n", ch);
Expand All @@ -1125,7 +1126,7 @@ static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_put_char: mp or mp->ncci NULL\n");
#endif
return;
return 0;
}

spin_lock_irqsave(&workaround_lock, flags);
Expand All @@ -1134,7 +1135,7 @@ static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
if (skb_tailroom(skb) > 0) {
*(skb_put(skb, 1)) = ch;
spin_unlock_irqrestore(&workaround_lock, flags);
return;
return 1;
}
mp->ttyskb = NULL;
skb_queue_tail(&mp->outqueue, skb);
Expand All @@ -1148,8 +1149,10 @@ static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
mp->ttyskb = skb;
} else {
printk(KERN_ERR "capinc_put_char: char %u lost\n", ch);
ret = 0;
}
spin_unlock_irqrestore(&workaround_lock, flags);
return ret;
}

static void capinc_tty_flush_chars(struct tty_struct *tty)
Expand Down

0 comments on commit 3032732

Please sign in to comment.