HID: constify params and return value of fetch_item()
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 3 Aug 2024 12:34:20 +0000 (14:34 +0200)
committerBenjamin Tissoires <bentiss@kernel.org>
Tue, 27 Aug 2024 14:18:51 +0000 (16:18 +0200)
commit80cfb508f3fe4c7c6a567fc4aa863c9a38709cd5
treeecd055cb977d58734a02374230052abf4e39ba39
parent24ddd0d7de7aaf50f537fd727f31616cb5a65a9e
HID: constify params and return value of fetch_item()

fetch_item() does not modify the descriptor it operates on.
As a prerequisite for the constification of hid_driver::dev_rdesc,
mark the parameters and return value of fetch_item() as const.

Also adapt the variable types in the callers to match this
constification.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240803-hid-const-fixup-v2-4-f53d7a7b29d8@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/hid-core.c
include/linux/hid.h