Commit 61e60630 authored by Adrian Barnaś's avatar Adrian Barnaś Committed by Greg Kroah-Hartman
Browse files

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: default avatarAdrian Barnaś <abarnas@google.com>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20250919065327.672924-1-abarnas@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b93606c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ static int eisa_bus_uevent(const struct device *dev, struct kobj_uevent_env *env
	return 0;
}

struct bus_type eisa_bus_type = {
const struct bus_type eisa_bus_type = {
	.name  = "eisa",
	.match = eisa_bus_match,
	.uevent = eisa_bus_uevent,
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ struct eisa_driver {
/* These external functions are only available when EISA support is enabled. */
#ifdef CONFIG_EISA

extern struct bus_type eisa_bus_type;
extern const struct bus_type eisa_bus_type;
int eisa_driver_register (struct eisa_driver *edrv);
void eisa_driver_unregister (struct eisa_driver *edrv);