aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo B. Marliere <[email protected]>2024-02-04 12:56:44 -0300
committerJernej Skrabec <[email protected]>2024-02-11 21:24:48 +0100
commit0daf87e7b47e05d0c9ccab648d5e45eaddb547f8 (patch)
treebdfb90da093dbd824fdffef8b7e3246e56737552
parent6613476e225e090cc9aad49be7fa504e290dd33d (diff)
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 <[email protected]> Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Acked-by: Jernej Skrabec <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jernej Skrabec <[email protected]>
-rw-r--r--drivers/bus/sunxi-rsb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
index fd3e9d82340a..1e29ba76615d 100644
--- a/drivers/bus/sunxi-rsb.c
+++ b/drivers/bus/sunxi-rsb.c
@@ -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,