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

Skip to content
Commit b20795b8 authored by Jack Pham's avatar Jack Pham
Browse files

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: default avatarJack Pham <jackp@codeaurora.org>
parent d2056c0d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment