Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e64e65b authored by Benoit Goby's avatar Benoit Goby Committed by Matt Wagantall
Browse files

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.

Change-Id: Ied28ee416bb6f00c434c34176fe5b7f0dcb2b2d4
Signed-off-by: default avatarBenoit Goby <benoit@android.com>
Git-commit: bdad8743fb2c866e7dda5f8b903415046401ab4d
Git-repo: https://android.googlesource.com/kernel/common/


[jackp@codeaurora.org: Omitted RNDIS changes that aren't needed on 3.14]
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent ad2f6e2e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -3141,7 +3141,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.