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 <gregkh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Ricardo B. Marliere <ricardo@xxxxxxxxxxxx> --- drivers/staging/fieldbus/anybuss/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fieldbus/anybuss/host.c b/drivers/staging/fieldbus/anybuss/host.c index cd86b9c9e345..410e6f8073c0 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, --- base-commit: ce54e9342124ededf0a00ed4e8a8aee535bfbf00 change-id: 20240203-bus_cleanup-staging-0cda1a5a70e4 Best regards, -- Ricardo B. Marliere <ricardo@xxxxxxxxxxxx>