Hi Gerd,
Thanks for the reviews!
seabios has a linked list implementation (see src/list.h). Please use that instead of rolling your own.
Otherwise the patch looks sane on a quick glance.
Thanks for this suggestion as well. I tried it out but I'm having trouble getting it to work. My SeaBIOS hangs after the splash screen. I believe it's due to how the hlist_for_each_entry macro retrieves the node container via the inner macro call to container_of. Since the containers are in FSEG (so they can be used during runtime) I believe they need to be retrieved with GET_GLOBAL (like I do in the previous patches' for loops). I attached the hlist version as 0001-Use-hlists-to-track-USB-HID-devices.patch
Is it necessary to use hlist? Linked lists are simple enough and I'm not using the double-linked list nature of hlist. I made a few more tweaks to the original linked list approach as 0001-Support-multiple-USB-HID-devices-3.patch
Cheers, - Daniel K.