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

drivers: rapidio: make rio_bus_type const



Because driver core can properly handle constant struct bus_type,
move the rio_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/20250919073201.751348-1-abarnas@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 61e60630
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ struct class rio_mport_class = {
};
EXPORT_SYMBOL_GPL(rio_mport_class);

struct bus_type rio_bus_type = {
const struct bus_type rio_bus_type = {
	.name = "rapidio",
	.match = rio_match_bus,
	.dev_groups = rio_dev_groups,
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@
#define RIO_CTAG_RESRVD	0xfffe0000 /* Reserved */
#define RIO_CTAG_UDEVID	0x0001ffff /* Unique device identifier */

extern struct bus_type rio_bus_type;
extern const struct bus_type rio_bus_type;
extern struct class rio_mport_class;

struct rio_mport;