summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-core.c
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 /drivers/hid/hid-core.c
parentMerge tag 'hid-for-linus-2023121901' of git://git.kernel.org/pub/scm/linux/ke... (diff)
downloadlinux-37d158d0b05144f696323ae5bbfe1e137f7c06d3.tar.xz
linux-37d158d0b05144f696323ae5bbfe1e137f7c06d3.zip
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 'drivers/hid/hid-core.c')
-rw-r--r--drivers/hid/hid-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index e0181218ad85..de7a477d6665 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2749,7 +2749,7 @@ static int hid_uevent(const struct device *dev, struct kobj_uevent_env *env)
return 0;
}
-struct bus_type hid_bus_type = {
+const struct bus_type hid_bus_type = {
.name = "hid",
.dev_groups = hid_dev_groups,
.drv_groups = hid_drv_groups,