Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184233
b: refs/heads/master
c: 2c8df72
h: refs/heads/master
i:
  184231: e75506f
v: v3
  • Loading branch information
Jan Kiszka authored and David S. Miller committed Feb 17, 2010
1 parent 1208559 commit 23196ed
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 34 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: fb4b4881ef951f6ed8fb8564ca1821dea10778c4
refs/heads/master: 2c8df72259d550ed6dc0b391feb5c2fc13892fb6
64 changes: 31 additions & 33 deletions trunk/drivers/isdn/capi/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,15 +1097,15 @@ static void capinc_tty_close(struct tty_struct *tty, struct file *filp)
static int capinc_tty_write(struct tty_struct * tty,
const unsigned char *buf, int count)
{
struct capiminor *mp = (struct capiminor *)tty->driver_data;
struct capiminor *mp = tty->driver_data;
struct sk_buff *skb;
unsigned long flags;

#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_write(count=%d)\n", count);
#endif

if (!mp || !mp->nccip) {
if (!mp->nccip) {
#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_write: mp or mp->ncci NULL\n");
#endif
Expand Down Expand Up @@ -1140,7 +1140,7 @@ static int capinc_tty_write(struct tty_struct * tty,

static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
{
struct capiminor *mp = (struct capiminor *)tty->driver_data;
struct capiminor *mp = tty->driver_data;
struct sk_buff *skb;
unsigned long flags;
int ret = 1;
Expand All @@ -1149,7 +1149,7 @@ static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
printk(KERN_DEBUG "capinc_put_char(%u)\n", ch);
#endif

if (!mp || !mp->nccip) {
if (!mp->nccip) {
#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_put_char: mp or mp->ncci NULL\n");
#endif
Expand Down Expand Up @@ -1184,15 +1184,15 @@ static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)

static void capinc_tty_flush_chars(struct tty_struct *tty)
{
struct capiminor *mp = (struct capiminor *)tty->driver_data;
struct capiminor *mp = tty->driver_data;
struct sk_buff *skb;
unsigned long flags;

#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_flush_chars\n");
#endif

if (!mp || !mp->nccip) {
if (!mp->nccip) {
#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_flush_chars: mp or mp->ncci NULL\n");
#endif
Expand All @@ -1213,9 +1213,10 @@ static void capinc_tty_flush_chars(struct tty_struct *tty)

static int capinc_tty_write_room(struct tty_struct *tty)
{
struct capiminor *mp = (struct capiminor *)tty->driver_data;
struct capiminor *mp = tty->driver_data;
int room;
if (!mp || !mp->nccip) {

if (!mp->nccip) {
#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_write_room: mp or mp->ncci NULL\n");
#endif
Expand All @@ -1231,8 +1232,9 @@ static int capinc_tty_write_room(struct tty_struct *tty)

static int capinc_tty_chars_in_buffer(struct tty_struct *tty)
{
struct capiminor *mp = (struct capiminor *)tty->driver_data;
if (!mp || !mp->nccip) {
struct capiminor *mp = tty->driver_data;

if (!mp->nccip) {
#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_chars_in_buffer: mp or mp->ncci NULL\n");
#endif
Expand Down Expand Up @@ -1266,55 +1268,51 @@ static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old
#endif
}

static void capinc_tty_throttle(struct tty_struct * tty)
static void capinc_tty_throttle(struct tty_struct *tty)
{
struct capiminor *mp = (struct capiminor *)tty->driver_data;
struct capiminor *mp = tty->driver_data;
#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_throttle\n");
#endif
if (mp)
mp->ttyinstop = 1;
mp->ttyinstop = 1;
}

static void capinc_tty_unthrottle(struct tty_struct * tty)
static void capinc_tty_unthrottle(struct tty_struct *tty)
{
struct capiminor *mp = (struct capiminor *)tty->driver_data;
struct capiminor *mp = tty->driver_data;
unsigned long flags;

#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_unthrottle\n");
#endif
if (mp) {
spin_lock_irqsave(&workaround_lock, flags);
mp->ttyinstop = 0;
handle_minor_recv(mp);
spin_unlock_irqrestore(&workaround_lock, flags);
}
spin_lock_irqsave(&workaround_lock, flags);
mp->ttyinstop = 0;
handle_minor_recv(mp);
spin_unlock_irqrestore(&workaround_lock, flags);
}

static void capinc_tty_stop(struct tty_struct *tty)
{
struct capiminor *mp = (struct capiminor *)tty->driver_data;
struct capiminor *mp = tty->driver_data;

#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_stop\n");
#endif
if (mp) {
mp->ttyoutstop = 1;
}
mp->ttyoutstop = 1;
}

static void capinc_tty_start(struct tty_struct *tty)
{
struct capiminor *mp = (struct capiminor *)tty->driver_data;
struct capiminor *mp = tty->driver_data;
unsigned long flags;

#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_start\n");
#endif
if (mp) {
spin_lock_irqsave(&workaround_lock, flags);
mp->ttyoutstop = 0;
(void)handle_minor_send(mp);
spin_unlock_irqrestore(&workaround_lock, flags);
}
spin_lock_irqsave(&workaround_lock, flags);
mp->ttyoutstop = 0;
(void)handle_minor_send(mp);
spin_unlock_irqrestore(&workaround_lock, flags);
}

static void capinc_tty_hangup(struct tty_struct *tty)
Expand Down

0 comments on commit 23196ed

Please sign in to comment.