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
parent
61e6063056
commit
8ce6b508f2
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue