mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
Merge "usb: gadget: Reset string ids upon unbind"
This commit is contained in:
commit
5ff8a4813a
2 changed files with 10 additions and 0 deletions
|
|
@ -867,6 +867,9 @@ static void usb_cser_unbind(struct usb_configuration *c, struct usb_function *f)
|
|||
{
|
||||
struct f_cdev *port = func_to_port(f);
|
||||
|
||||
/* Reset string id */
|
||||
cser_string_defs[0].id = 0;
|
||||
|
||||
usb_free_all_descriptors(f);
|
||||
usb_cser_free_req(port->port_usb.notify, port->port_usb.notify_req);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3094,6 +3094,13 @@ static void gsi_unbind(struct usb_configuration *c, struct usb_function *f)
|
|||
|
||||
ipa_usb_deinit_teth_prot(gsi->prot_id);
|
||||
|
||||
/* Reset string ids */
|
||||
rndis_gsi_string_defs[0].id = 0;
|
||||
ecm_gsi_string_defs[0].id = 0;
|
||||
rmnet_gsi_string_defs[0].id = 0;
|
||||
mbim_gsi_string_defs[0].id = 0;
|
||||
qdss_gsi_string_defs[0].id = 0;
|
||||
|
||||
if (gsi->prot_id == IPA_USB_RNDIS) {
|
||||
gsi->d_port.sm_state = STATE_UNINITIALIZED;
|
||||
rndis_deregister(gsi->params);
|
||||
|
|
|
|||
Loading…
Reference in a new issue