summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/android.c
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2012-02-02 10:39:38 +0530
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-02-03 05:55:06 -0800
commit6139e2371765737ca134fa34bb381fad0de87f58 (patch)
tree142b848b6ea233893de627ccb1149c1a71c4886a /drivers/usb/gadget/android.c
parent433721b4cc57e3a6a34a9b013b1a4aac5a9e644f (diff)
usb: gadget: Fix usb string id allocation
Don't reset next_string_id every time the gadget is enabled, this makes the next strings allocated overwrite strings allocated at probe time. Instead, fix rndis not to allocate new string ids on every config bind. (cherry picked from commit a6ccb73389f3df11e788bf84254a7b27c430f949 from android.googlesource.com/common.git) Change-Id: Ied28ee416bb6f00c434c34176fe5b7f0dcb2b2d4 Signed-off-by: Benoit Goby <benoit@android.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/78888 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/usb/gadget/android.c')
-rw-r--r--drivers/usb/gadget/android.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c
index c643fdabf5f6..bb3ab3b0e2cc 100644
--- a/drivers/usb/gadget/android.c
+++ b/drivers/usb/gadget/android.c
@@ -840,7 +840,6 @@ static ssize_t enable_store(struct device *pdev, struct device_attribute *attr,
sscanf(buff, "%d", &enabled);
if (enabled && !dev->enabled) {
- cdev->next_string_id = 0;
/* update values in composite driver's copy of device descriptor */
cdev->desc.idVendor = device_desc.idVendor;
cdev->desc.idProduct = device_desc.idProduct;