summaryrefslogtreecommitdiff
path: root/drivers/net/netdevsim/bus.c
diff options
context:
space:
mode:
authorRicardo B. Marliere <ricardo@marliere.net>2024-02-04 23:16:34 +0300
committerDavid S. Miller <davem@davemloft.net>2024-02-07 16:40:27 +0300
commit56b93cd358b304b2d1945c0330dffe8f872bc0d3 (patch)
tree25147a4ecf9ce2cef9bf68a0ce43fb2c03d1217a /drivers/net/netdevsim/bus.c
parent59d6bccebe5c747d6f4dcbc4862ad7b52571b3fc (diff)
downloadlinux-56b93cd358b304b2d1945c0330dffe8f872bc0d3.tar.xz
netdevsim: make nsim_bus const
Now that the driver core can properly handle constant struct bus_type, move the nsim_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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim/bus.c')
-rw-r--r--drivers/net/netdevsim/bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/netdevsim/bus.c b/drivers/net/netdevsim/bus.c
index bcbc1e19edde..aedab1d9623a 100644
--- a/drivers/net/netdevsim/bus.c
+++ b/drivers/net/netdevsim/bus.c
@@ -260,7 +260,7 @@ static int nsim_num_vf(struct device *dev)
return nsim_bus_dev->num_vfs;
}
-static struct bus_type nsim_bus = {
+static const struct bus_type nsim_bus = {
.name = DRV_NAME,
.dev_name = DRV_NAME,
.bus_groups = nsim_bus_groups,