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

Commit b77c0349 authored by Lena Salman's avatar Lena Salman Committed by Gerrit - the friendly Code Review server
Browse files

usb: gadget: change the minor number for android functions



Due to latest addition of android1 as a valid device
at commit 5a11767b (usb_bam: changes for HSIC IPA
functionality) there was a collision of the same minor
number for android1 and f_ffs. This caused removal of
the wrong device when the initial probe/init fails.
This commit fixes the initial index to 2 to prevent
a collision with android0 and android1.

Change-Id: Ie4379043bbd0bd200c6093e229ca54ecce66732f
Signed-off-by: default avatarLena Salman <esalman@codeaurora.org>
parent 913bc12d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2814,7 +2814,9 @@ static int android_init_functions(struct android_usb_function **functions,
	struct device_attribute **attrs;
	struct device_attribute *attr;
	int err = 0;
	int index = 1; /* index 0 is for android0 device */
	int index = 2; /* index 0 is for android0 device
			* index 1 is for android1 device
			*/

	for (; (f = *functions++); index++) {
		f->dev_name = kasprintf(GFP_KERNEL, "f_%s", f->name);