Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240203-bus_cleanup-staging-v1-1-a13448ddb4c7@marliere.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ricardo B. Marliere and committed by
Greg Kroah-Hartman
e1f97d7e cfd87832

+1 -1
+1 -1
drivers/staging/fieldbus/anybuss/host.c
··· 1195 1195 adrv->remove(to_anybuss_client(dev)); 1196 1196 } 1197 1197 1198 - static struct bus_type anybus_bus = { 1198 + static const struct bus_type anybus_bus = { 1199 1199 .name = "anybuss", 1200 1200 .match = anybus_bus_match, 1201 1201 .probe = anybus_bus_probe,