Re: [PATCH v1 0/9] HID: Make driver_data in hid_device_id a union
From: Pawel Zalewski
Date: Wed Nov 25 2026 - 09:23:46 EST
For the record I did attempt this in the past [1], this approach was
rejected and a series which changes driver_data to be always an
integer was created instead [2]. However, I personally much prefer the
anonymous union approach, given that it will already be the case in
other subsystems. The HID subsystem doesn't need to go its own way and
the alternative is slightly uglier in practice (as you end up looking
up from tables via an index).
[1] https://lore.kernel.org/linux-input/20260518-mod-devicetable-hid_device_id-v1-0-a08e3989c283@xxxxxxxxxxxxxxxxxxxx/
[2] https://lore.kernel.org/linux-input/20260727-mod-devicetable-hid_device_id-v3-0-980896ca283e@xxxxxxxxxxxxxxxxxxxx/
Reviewed-by: Pawel Zalewski <pzalewski@xxxxxxxxxxxxxxxxxxxx>