Commit ab23f1bf authored by Ricardo B. Marliere's avatar Ricardo B. Marliere Committed by Greg Kroah-Hartman

slimbus: core: make slimbus_bus const

Since commit d492cc25 ("driver core: device.h: make struct
bus_type a const *"), the driver core can properly handle constant
struct bus_type, move the slimbus_bus variable to be a constant
structure as well, placing it into read-only memory which can not be
modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatar"Ricardo B. Marliere" <ricardo@marliere.net>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240224114403.86230-3-srinivas.kandagatla@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 56c7659a
...@@ -100,7 +100,7 @@ static int slim_device_uevent(const struct device *dev, struct kobj_uevent_env * ...@@ -100,7 +100,7 @@ static int slim_device_uevent(const struct device *dev, struct kobj_uevent_env *
return add_uevent_var(env, "MODALIAS=slim:%s", dev_name(&sbdev->dev)); return add_uevent_var(env, "MODALIAS=slim:%s", dev_name(&sbdev->dev));
} }
struct bus_type slimbus_bus = { const struct bus_type slimbus_bus = {
.name = "slimbus", .name = "slimbus",
.match = slim_device_match, .match = slim_device_match,
.probe = slim_device_probe, .probe = slim_device_probe,
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/mod_devicetable.h> #include <linux/mod_devicetable.h>
extern struct bus_type slimbus_bus; extern const struct bus_type slimbus_bus;
/** /**
* struct slim_eaddr - Enumeration address for a SLIMbus device * struct slim_eaddr - Enumeration address for a SLIMbus device
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment