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: vme: make vme_bus_type const

Now that the driver core can properly handle constant struct bus_type,
move the vme_bus_type 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/20240208-bus_cleanup-staging2-v1-2-cfe906133a2c@marliere.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ricardo B. Marliere and committed by
Greg Kroah-Hartman
133951fd 869eb452

+2 -2
+1 -1
drivers/staging/vme_user/vme.c
··· 1970 1970 driver->remove(vdev); 1971 1971 } 1972 1972 1973 - struct bus_type vme_bus_type = { 1973 + const struct bus_type vme_bus_type = { 1974 1974 .name = "vme", 1975 1975 .match = vme_bus_match, 1976 1976 .probe = vme_bus_probe,
+1 -1
drivers/staging/vme_user/vme.h
··· 81 81 struct list_head *entry; 82 82 }; 83 83 84 - extern struct bus_type vme_bus_type; 84 + extern const struct bus_type vme_bus_type; 85 85 86 86 /* Number of VME interrupt vectors */ 87 87 #define VME_NUM_STATUSID 256