Commit e1f97d7e authored by Ricardo B. Marliere's avatar Ricardo B. Marliere Committed by Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarRicardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240203-bus_cleanup-staging-v1-1-a13448ddb4c7@marliere.netSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cfd87832
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment