mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
usb: gadget: ether: put_usb_function on unbind
Fix bugs introduced in9c62ce83e4usb: gadget: ether: convert to new interface of f_ecm94b5573e97usb: gadget: ether: convert to new interface of f_eem8af5232d6fusb: gadget: ether: convert to new interface of f_subset9bd4a10e1busb: gadget: ether: convert to new interface of f_rndis Acked-by: Michal Nazarewicz <[email protected]> Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
This commit is contained in:
parent
c1f01be406
commit
23a113a0f3
1 changed files with 10 additions and 4 deletions
|
|
@ -449,14 +449,20 @@ fail:
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue