Commit 0daf87e7 authored by Ricardo B. Marliere's avatar Ricardo B. Marliere Committed by Jernej Skrabec

bus: sunxi-rsb: make sunxi_rsb_bus const

Now that the driver core can properly handle constant struct bus_type,
move the sunxi_rsb_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 avatarRicardo B. Marliere <ricardo@marliere.net>
Acked-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240204-bus_cleanup-bus-v1-1-bda309c4b829@marliere.netSigned-off-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
parent 6613476e
......@@ -128,7 +128,7 @@ struct sunxi_rsb {
};
/* bus / slave device related functions */
static struct bus_type sunxi_rsb_bus;
static const struct bus_type sunxi_rsb_bus;
static int sunxi_rsb_device_match(struct device *dev, struct device_driver *drv)
{
......@@ -177,7 +177,7 @@ static int sunxi_rsb_device_modalias(const struct device *dev, struct kobj_ueven
return of_device_uevent_modalias(dev, env);
}
static struct bus_type sunxi_rsb_bus = {
static const struct bus_type sunxi_rsb_bus = {
.name = RSB_CTRL_NAME,
.match = sunxi_rsb_device_match,
.probe = sunxi_rsb_device_probe,
......
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