usb_hid_drv: wait for keyboard LED registry in 'led_connect()'
It can happen that a keyboard gets plugged in and 'led_connect()' is called while the keyboard LED of another keyboard is just being updated (and the registry is locked). Fixes #3118
This commit is contained in:
parent
ece5cbbbb5
commit
21ed41da9a
|
@ -422,6 +422,8 @@ static Genode::Constructible<Usb::Led> _led;
|
||||||
static int led_connect(struct input_handler *handler, struct input_dev *dev,
|
static int led_connect(struct input_handler *handler, struct input_dev *dev,
|
||||||
const struct input_device_id *id)
|
const struct input_device_id *id)
|
||||||
{
|
{
|
||||||
|
_led->wait_for_registry();
|
||||||
|
|
||||||
Keyboard_led *keyboard = new (Lx_kit::env().heap()) Keyboard_led(_registry, dev);
|
Keyboard_led *keyboard = new (Lx_kit::env().heap()) Keyboard_led(_registry, dev);
|
||||||
_led->update(*keyboard);
|
_led->update(*keyboard);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user