Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354635
b: refs/heads/master
c: 779d516
h: refs/heads/master
i:
  354633: 7d8a3c9
  354631: b32b0e5
v: v3
  • Loading branch information
Sebastian Andrzej Siewior authored and Felipe Balbi committed Jan 21, 2013
1 parent 0342a55 commit 468d180
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: afd2e186bd7e58dc9d298ff5fb5a2fc30578867e
refs/heads/master: 779d516ca91d796cb37bd0760282d08f90661ee2
12 changes: 8 additions & 4 deletions trunk/drivers/usb/gadget/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,8 +1349,7 @@ static ssize_t composite_show_suspended(struct device *dev,

static DEVICE_ATTR(suspended, 0444, composite_show_suspended, NULL);

static void
composite_unbind(struct usb_gadget *gadget)
static void __composite_unbind(struct usb_gadget *gadget, bool unbind_driver)
{
struct usb_composite_dev *cdev = get_gadget_data(gadget);

Expand All @@ -1367,7 +1366,7 @@ composite_unbind(struct usb_gadget *gadget)
struct usb_configuration, list);
remove_config(cdev, c);
}
if (cdev->driver->unbind)
if (cdev->driver->unbind && unbind_driver)
cdev->driver->unbind(cdev);

if (cdev->req) {
Expand All @@ -1380,6 +1379,11 @@ composite_unbind(struct usb_gadget *gadget)
set_gadget_data(gadget, NULL);
}

static void composite_unbind(struct usb_gadget *gadget)
{
__composite_unbind(gadget, true);
}

static void update_unchanged_dev_desc(struct usb_device_descriptor *new,
const struct usb_device_descriptor *old)
{
Expand Down Expand Up @@ -1488,7 +1492,7 @@ static int composite_bind(struct usb_gadget *gadget,
return 0;

fail:
composite_unbind(gadget);
__composite_unbind(gadget, false);
return status;
}

Expand Down

0 comments on commit 468d180

Please sign in to comment.