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.

driver core: container: make container_subsys const

Now that the driver core can properly handle constant struct bus_type,
move the container_subsys variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/2023121919-chatter-grumbling-9ef3@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+2 -2
+1 -1
drivers/base/container.c
··· 24 24 return cdev->offline ? cdev->offline(cdev) : 0; 25 25 } 26 26 27 - struct bus_type container_subsys = { 27 + const struct bus_type container_subsys = { 28 28 .name = CONTAINER_BUS_NAME, 29 29 .dev_name = CONTAINER_BUS_NAME, 30 30 .online = trivial_online,
+1 -1
include/linux/container.h
··· 12 12 #include <linux/device.h> 13 13 14 14 /* drivers/base/power/container.c */ 15 - extern struct bus_type container_subsys; 15 + extern const struct bus_type container_subsys; 16 16 17 17 struct container_dev { 18 18 struct device dev;