diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-24 11:44:03 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-07 20:21:39 +0000 |
commit | ab23f1bffcf690ffae2b0c4bb8b09420299be05c (patch) | |
tree | 2d974f6d9e31577f97dfa75b2540622843c0b2cf /drivers | |
parent | 56c7659a8b6b8238535124fe78679cda4dba7fbc (diff) | |
download | linux-ab23f1bffcf690ffae2b0c4bb8b09420299be05c.tar.gz linux-ab23f1bffcf690ffae2b0c4bb8b09420299be05c.tar.bz2 linux-ab23f1bffcf690ffae2b0c4bb8b09420299be05c.zip |
slimbus: core: make slimbus_bus const
Since commit d492cc2573a0 ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240224114403.86230-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/slimbus/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 01cbd4621981..41e62de1f91f 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -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)); } -struct bus_type slimbus_bus = { +const struct bus_type slimbus_bus = { .name = "slimbus", .match = slim_device_match, .probe = slim_device_probe, |