diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-11-27 17:41:56 +0100 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-11-28 14:49:28 +0100 |
commit | f9a11da1d92f78279afafdc811214b88cfe54a77 (patch) | |
tree | 57f7bc0821e42d98fac61e1f1ea608aec5b78a49 /drivers/hid | |
parent | selftests: hid: fix typo and exit code (diff) | |
download | linux-f9a11da1d92f78279afafdc811214b88cfe54a77.tar.xz linux-f9a11da1d92f78279afafdc811214b88cfe54a77.zip |
HID: bpf: constify hid_ops
The hid_ops struct is never modified. Mark it as const.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20241127-hid-bpf-ops-v1-1-f9e41bfa3afd@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/bpf/hid_bpf_dispatch.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/bpf/hid_bpf_dispatch.c b/drivers/hid/bpf/hid_bpf_dispatch.c index 961b7f35aa67..e8be9ab51d63 100644 --- a/drivers/hid/bpf/hid_bpf_dispatch.c +++ b/drivers/hid/bpf/hid_bpf_dispatch.c @@ -19,7 +19,7 @@ #include <linux/module.h> #include "hid_bpf_dispatch.h" -struct hid_ops *hid_ops; +const struct hid_ops *hid_ops; EXPORT_SYMBOL(hid_ops); u8 * diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 98bef39642a9..33a191973324 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -3064,7 +3064,7 @@ int hid_check_keys_pressed(struct hid_device *hid) EXPORT_SYMBOL_GPL(hid_check_keys_pressed); #ifdef CONFIG_HID_BPF -static struct hid_ops __hid_ops = { +static const struct hid_ops __hid_ops = { .hid_get_report = hid_get_report, .hid_hw_raw_request = __hid_hw_raw_request, .hid_hw_output_report = __hid_hw_output_report, |