OSDN Git Service

usb: gadget: android: Reset next_string_id before enable
authorBenoit Goby <benoit@android.com>
Tue, 29 Nov 2011 02:01:03 +0000 (18:01 -0800)
committerBenoit Goby <benoit@android.com>
Tue, 29 Nov 2011 03:02:13 +0000 (19:02 -0800)
commit6a4a38525d60db7e915d559273d8c89db5a98edf
tree76e5898610f63f6b88c44d22798ed1338a2b5717
parentdbb18fb2c1519b7810018580ee5123f9be73f213
usb: gadget: android: Reset next_string_id before enable

Reset next_string_id to 0 before enabling the gadget driver. Otherwise,
after a large number of enable/disable cycles, bind will fail
because we cannot allocate new string ids. String ids cannot be larger
than 254 per USB spec.

Change-Id: I44f5fece45008b7a0a18c025d4eb5ce842585c28
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/usb/gadget/android.c