Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168713
b: refs/heads/master
c: 051522b
h: refs/heads/master
i:
  168711: d0ab04b
v: v3
  • Loading branch information
Francesco Lavra authored and Greg Kroah-Hartman committed Nov 18, 2009
1 parent 2dd2232 commit 7b43bbe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 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: 18a77b5d237a67d2c621a46f5271a3b51da1b380
refs/heads/master: 051522bb47797f7168a617a0752d7ddc1a2f6f24
16 changes: 11 additions & 5 deletions trunk/drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,15 +686,21 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)

/* Perform the closing process and see if we need to do the hardware
shutdown */
if (!acm || tty_port_close_start(&acm->port, tty, filp) == 0)
if (!acm)
return;
if (tty_port_close_start(&acm->port, tty, filp) == 0) {
mutex_lock(&open_mutex);
if (!acm->dev) {
tty_port_tty_set(&acm->port, NULL);
acm_tty_unregister(acm);
tty->driver_data = NULL;
}
mutex_unlock(&open_mutex);
return;
}
acm_port_down(acm, 0);
tty_port_close_end(&acm->port, tty);
mutex_lock(&open_mutex);
tty_port_tty_set(&acm->port, NULL);
if (!acm->dev)
acm_tty_unregister(acm);
mutex_unlock(&open_mutex);
}

static int acm_tty_write(struct tty_struct *tty,
Expand Down

0 comments on commit 7b43bbe

Please sign in to comment.