Skip to content

Commit

Permalink
usb: gadget: ether: put_usb_function on unbind
Browse files Browse the repository at this point in the history
Fix bugs introduced in

9c62ce8
usb: gadget: ether: convert to new interface of f_ecm

94b5573
usb: gadget: ether: convert to new interface of f_eem

8af5232
usb: gadget: ether: convert to new interface of f_subset

9bd4a10
usb: gadget: ether: convert to new interface of f_rndis

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Andrzej Pietrasiewicz authored and Felipe Balbi committed Jul 25, 2013
1 parent c1f01be commit 23a113a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions drivers/usb/gadget/ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,20 @@ static int __init eth_bind(struct usb_composite_dev *cdev)

static int __exit eth_unbind(struct usb_composite_dev *cdev)
{
if (has_rndis())
if (has_rndis()) {
usb_put_function(f_rndis);
usb_put_function_instance(fi_rndis);
if (use_eem)
}
if (use_eem) {
usb_put_function(f_eem);
usb_put_function_instance(fi_eem);
else if (can_support_ecm(cdev->gadget))
} else if (can_support_ecm(cdev->gadget)) {
usb_put_function(f_ecm);
usb_put_function_instance(fi_ecm);
else
} else {
usb_put_function(f_geth);
usb_put_function_instance(fi_geth);
}
return 0;
}

Expand Down

0 comments on commit 23a113a

Please sign in to comment.