Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drivers: eisa: make eisa_bus_type const

Because driver core can properly handle constant struct bus_type,
move the eisa_bus_type to be a constant structure as well, placing it into
read-only memory which can not be modified at runtime.

Signed-off-by: Adrian Barnaś <abarnas@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20250919065327.672924-1-abarnas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Adrian Barnaś and committed by
Greg Kroah-Hartman
61e60630 b93606c5

+2 -2
+1 -1
drivers/eisa/eisa-bus.c
··· 135 135 return 0; 136 136 } 137 137 138 - struct bus_type eisa_bus_type = { 138 + const struct bus_type eisa_bus_type = { 139 139 .name = "eisa", 140 140 .match = eisa_bus_match, 141 141 .uevent = eisa_bus_uevent,
+1 -1
include/linux/eisa.h
··· 68 68 /* These external functions are only available when EISA support is enabled. */ 69 69 #ifdef CONFIG_EISA 70 70 71 - extern struct bus_type eisa_bus_type; 71 + extern const struct bus_type eisa_bus_type; 72 72 int eisa_driver_register (struct eisa_driver *edrv); 73 73 void eisa_driver_unregister (struct eisa_driver *edrv); 74 74