From: Ricardo B. Marliere Date: Sat, 3 Feb 2024 18:11:35 +0000 (-0300) Subject: staging: fieldbus: make anybus_bus const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e1f97d7ef608962de2206a8899c6f18dc4f36fdc;p=linux.git staging: fieldbus: make anybus_bus const Now that the driver core can properly handle constant struct bus_type, move the anybus_bus variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Link: https://lore.kernel.org/r/20240203-bus_cleanup-staging-v1-1-a13448ddb4c7@marliere.net Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/fieldbus/anybuss/host.c b/drivers/staging/fieldbus/anybuss/host.c index cd86b9c9e3458..410e6f8073c0b 100644 --- a/drivers/staging/fieldbus/anybuss/host.c +++ b/drivers/staging/fieldbus/anybuss/host.c @@ -1195,7 +1195,7 @@ static void anybus_bus_remove(struct device *dev) adrv->remove(to_anybuss_client(dev)); } -static struct bus_type anybus_bus = { +static const struct bus_type anybus_bus = { .name = "anybuss", .match = anybus_bus_match, .probe = anybus_bus_probe,