Skip to content

Commit 0daf87e

Browse files
rbmarlierejernejsk
authored andcommitted
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]>
1 parent 6613476 commit 0daf87e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/bus/sunxi-rsb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ struct sunxi_rsb {
128128
};
129129

130130
/* bus / slave device related functions */
131-
static struct bus_type sunxi_rsb_bus;
131+
static const struct bus_type sunxi_rsb_bus;
132132

133133
static int sunxi_rsb_device_match(struct device *dev, struct device_driver *drv)
134134
{
@@ -177,7 +177,7 @@ static int sunxi_rsb_device_modalias(const struct device *dev, struct kobj_ueven
177177
return of_device_uevent_modalias(dev, env);
178178
}
179179

180-
static struct bus_type sunxi_rsb_bus = {
180+
static const struct bus_type sunxi_rsb_bus = {
181181
.name = RSB_CTRL_NAME,
182182
.match = sunxi_rsb_device_match,
183183
.probe = sunxi_rsb_device_probe,

0 commit comments

Comments
 (0)