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: Adrian Barnaś <abarnas@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20250919073201.751348-1-abarnas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/1354/merge
Adrian Barnaś 2025-09-19 07:32:01 +00:00 committed by Greg Kroah-Hartman
parent 61e6063056
commit 8ce6b508f2
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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;