Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303655
b: refs/heads/master
c: 880bca3
h: refs/heads/master
i:
  303653: f8bd093
  303651: df0edb5
  303647: 82692af
v: v3
  • Loading branch information
Bjørn Mork authored and Greg Kroah-Hartman committed Apr 30, 2012
1 parent 7fb1703 commit 3f2bb0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 007bab91324e6337bb150ffc17b20cf829686370
refs/heads/master: 880bca3a2a6f159d7453e0cbcbfe2f1d8204d907
8 changes: 6 additions & 2 deletions trunk/drivers/usb/class/cdc-wdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,10 +620,12 @@ static int wdm_release(struct inode *inode, struct file *file)
if (!desc->count) {
dev_dbg(&desc->intf->dev, "wdm_release: cleanup");
kill_urbs(desc);
if (!test_bit(WDM_DISCONNECTING, &desc->flags))
if (!test_bit(WDM_DISCONNECTING, &desc->flags)) {
desc->manage_power(desc->intf, 0);
else
} else {
dev_dbg(&desc->intf->dev, "%s: device gone - cleaning up\n", __func__);
cleanup(desc);
}
}
mutex_unlock(&wdm_mutex);
return 0;
Expand Down Expand Up @@ -897,6 +899,8 @@ static void wdm_disconnect(struct usb_interface *intf)
mutex_unlock(&desc->rlock);
if (!desc->count)
cleanup(desc);
else
dev_dbg(&intf->dev, "%s: %d open files - postponing cleanup\n", __func__, desc->count);
mutex_unlock(&wdm_mutex);
}

Expand Down

0 comments on commit 3f2bb0a

Please sign in to comment.