greybus: make greybus_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the greybus_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Alex Elder <elder@kernel.org> Cc: greybus-dev@lists.linaro.org Reviewed-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/2024010517-handgun-scoreless-05e7@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
17bcddcd4a
commit
00b9850e73
@ -155,7 +155,7 @@ static void greybus_shutdown(struct device *dev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct bus_type greybus_bus_type = {
|
const struct bus_type greybus_bus_type = {
|
||||||
.name = "greybus",
|
.name = "greybus",
|
||||||
.match = greybus_match_device,
|
.match = greybus_match_device,
|
||||||
.uevent = greybus_uevent,
|
.uevent = greybus_uevent,
|
||||||
|
@ -104,7 +104,7 @@ void gb_debugfs_init(void);
|
|||||||
void gb_debugfs_cleanup(void);
|
void gb_debugfs_cleanup(void);
|
||||||
struct dentry *gb_debugfs_get(void);
|
struct dentry *gb_debugfs_get(void);
|
||||||
|
|
||||||
extern struct bus_type greybus_bus_type;
|
extern const struct bus_type greybus_bus_type;
|
||||||
|
|
||||||
extern struct device_type greybus_hd_type;
|
extern struct device_type greybus_hd_type;
|
||||||
extern struct device_type greybus_module_type;
|
extern struct device_type greybus_module_type;
|
||||||
|
Loading…
Reference in New Issue
Block a user