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>
This commit is contained in:
committed by
Benjamin Tissoires
parent
e8f34747bd
commit
f9a11da1d9
@@ -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 *
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user