HID: simplify code in fetch_item()

We can easily calculate the size of the item using arithmetic (shifts).
This allows to pull duplicated code out of the switch statement, making
it cleaner.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/ZvwYbESMZ667QZqY@google.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
This commit is contained in:
Dmitry Torokhov 2024-10-01 08:42:36 -07:00 • committed by Benjamin Tissoires
commit 61595012f2