CHROMIUM: input/hog-lib: register UHID device only when we have all info
We may not have all information needed to create a fully functional UHID
device when we get report map (reports may not be enumerated yet, and
country may still be unknown), so we need to delay until after we get
all relevant data. To achieve this we introduce a counter of
actions/callbacks relevant for UHID device creation and try to decrement
it when callback is executing and register UHID instance when counter
goes to 0.
BUG=b:184549777
TEST=Used a vivaldi keyboard
Change-Id: I87ee3f0e0c375eeb8d73dc292df00bc555a59833
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/bluez/+/2806589
Tested-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
1 file changed