usb: gadget: f_fs: Reuse string indexes when possible
The FunctionFS driver can be used with a single composite device
(i.e. Android gadget) which has a finite number of string indexes
that can be allocated. Economize the request for new string indexes
when re-binding an FFS function by first checking if the previously
allocated indexes can be reused. This will prevent running out of
indexes in long-running scenarios when dynamic userspace functions,
often the same one such as ADB, can get unbound and rebound many
times over a composite gadget's lifetime.
CRs-Fixed: 585982
Change-Id: Id8fa066307ef52262a169c9f21fc842b9cf3af7d
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment