summaryrefslogtreecommitdiff
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-20 08:38:46 +0100
committerJiri Kosina <jkosina@suse.com>2024-01-02 11:25:28 +0100
commit37d158d0b05144f696323ae5bbfe1e137f7c06d3 (patch)
treed96d663ee46e00d31538d64b812d0188ab2822fd /include/linux/hid.h
parent3f10e214a9de738832b357a58b605c2fbd23aa96 (diff)
HID: make hid_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the hid_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: linux-input@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r--include/linux/hid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index bf43f3ff6664..7c26db874ff0 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -912,7 +912,7 @@ extern bool hid_ignore(struct hid_device *);
extern int hid_add_device(struct hid_device *);
extern void hid_destroy_device(struct hid_device *);
-extern struct bus_type hid_bus_type;
+extern const struct bus_type hid_bus_type;
extern int __must_check __hid_register_driver(struct hid_driver *,
struct module *, const char *mod_name);