Merge "usb: gadget: mtp: reset string descriptor's index with unbind"

This commit is contained in:
Linux Build Service Account 2017-03-30 15:31:29 -07:00 committed by Gerrit - the friendly Code Review server
commit 3e41080faa

View file

@ -1504,6 +1504,7 @@ mtp_function_unbind(struct usb_configuration *c, struct usb_function *f)
struct usb_request *req;
int i;
mtp_string_defs[INTERFACE_STRING_INDEX].id = 0;
mutex_lock(&dev->read_mutex);
while ((req = mtp_req_get(dev, &dev->tx_idle)))
mtp_request_free(req, dev->ep_in);