Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304163
b: refs/heads/master
c: 19ef1b7
h: refs/heads/master
i:
  304161: 6935b6f
  304159: dcbcfb0
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 9, 2012
1 parent 0d65f92 commit 886ac8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 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: 7393af808fe1564ad34289b507b950445dfc06ac
refs/heads/master: 19ef1b7151dc58c4d90a76d364dc93721bb04e9b
17 changes: 8 additions & 9 deletions trunk/drivers/tty/ipwireless/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ struct ipw_tty {
unsigned int secondary_channel_idx;
int tty_type;
struct ipw_network *network;
struct tty_struct *linux_tty;
unsigned int control_lines;
struct mutex ipw_tty_mutex;
int tx_bytes_queued;
Expand Down Expand Up @@ -105,7 +104,7 @@ static int ipw_open(struct tty_struct *linux_tty, struct file *filp)

tty->port.count++;

tty->linux_tty = linux_tty;
tty->port.tty = linux_tty;
linux_tty->driver_data = tty;
linux_tty->low_latency = 1;

Expand All @@ -122,10 +121,10 @@ static void do_ipw_close(struct ipw_tty *tty)
tty->port.count--;

if (tty->port.count == 0) {
struct tty_struct *linux_tty = tty->linux_tty;
struct tty_struct *linux_tty = tty->port.tty;

if (linux_tty != NULL) {
tty->linux_tty = NULL;
tty->port.tty = NULL;
linux_tty->driver_data = NULL;

if (tty->tty_type == TTYTYPE_MODEM)
Expand Down Expand Up @@ -165,7 +164,7 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
int work = 0;

mutex_lock(&tty->ipw_tty_mutex);
linux_tty = tty->linux_tty;
linux_tty = tty->port.tty;
if (linux_tty == NULL) {
mutex_unlock(&tty->ipw_tty_mutex);
return;
Expand Down Expand Up @@ -553,9 +552,9 @@ void ipwireless_tty_free(struct ipw_tty *tty)
": deregistering %s device ttyIPWp%d\n",
tty_type_name(ttyj->tty_type), j);
ttyj->closing = 1;
if (ttyj->linux_tty != NULL) {
if (ttyj->port.tty != NULL) {
mutex_unlock(&ttyj->ipw_tty_mutex);
tty_vhangup(ttyj->linux_tty);
tty_vhangup(ttyj->port.tty);
/* FIXME: Exactly how is the tty object locked here
against a parallel ioctl etc */
/* FIXME2: hangup does not mean all processes
Expand Down Expand Up @@ -651,8 +650,8 @@ ipwireless_tty_notify_control_line_change(struct ipw_tty *tty,
*/
if ((old_control_lines & IPW_CONTROL_LINE_DCD)
&& !(tty->control_lines & IPW_CONTROL_LINE_DCD)
&& tty->linux_tty) {
tty_hangup(tty->linux_tty);
&& tty->port.tty) {
tty_hangup(tty->port.tty);
}
}

0 comments on commit 886ac8d

Please sign in to comment.