Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304161
b: refs/heads/master
c: e6df3cc
h: refs/heads/master
i:
  304159: dcbcfb0
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 9, 2012
1 parent ec6b32a commit 6935b6f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 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: de3a60a3436ebfd780ced830cd09880ea9c45957
refs/heads/master: e6df3cce07a25d7d65c7d3d2cec87cbf02fd21f0
31 changes: 10 additions & 21 deletions trunk/drivers/tty/ipwireless/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,6 @@ static char *tty_type_name(int tty_type)
return channel_names[tty_type];
}

static void report_registering(struct ipw_tty *tty)
{
char *iftype = tty_type_name(tty->tty_type);

printk(KERN_INFO IPWIRELESS_PCCARD_NAME
": registering %s device ttyIPWp%d\n", iftype, tty->index);
}

static void report_deregistering(struct ipw_tty *tty)
{
char *iftype = tty_type_name(tty->tty_type);

printk(KERN_INFO IPWIRELESS_PCCARD_NAME
": deregistering %s device ttyIPWp%d\n", iftype,
tty->index);
}

static struct ipw_tty *get_tty(int index)
{
/*
Expand Down Expand Up @@ -500,8 +483,12 @@ static int add_tty(int j,
ipwireless_associate_network_tty(network,
secondary_channel_idx,
ttys[j]);
if (get_tty(j) == ttys[j])
report_registering(ttys[j]);
/* check if we provide raw device (if loopback is enabled) */
if (get_tty(j))
printk(KERN_INFO IPWIRELESS_PCCARD_NAME
": registering %s device ttyIPWp%d\n",
tty_type_name(tty_type), j);

return 0;
}

Expand Down Expand Up @@ -560,8 +547,10 @@ void ipwireless_tty_free(struct ipw_tty *tty)

if (ttyj) {
mutex_lock(&ttyj->ipw_tty_mutex);
if (get_tty(j) == ttyj)
report_deregistering(ttyj);
if (get_tty(j))
printk(KERN_INFO IPWIRELESS_PCCARD_NAME
": deregistering %s device ttyIPWp%d\n",
tty_type_name(ttyj->tty_type), j);
ttyj->closing = 1;
if (ttyj->linux_tty != NULL) {
mutex_unlock(&ttyj->ipw_tty_mutex);
Expand Down

0 comments on commit 6935b6f

Please sign in to comment.