From: Ricardo B. Marliere Date: Sun, 4 Feb 2024 13:47:05 +0000 (-0300) Subject: workqueue: make wq_subsys const X-Git-Tag: v6.9-rc1~209^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d412ace11144aa2bf692c7cf9778351efc15c827;p=thirdparty%2Fkernel%2Flinux.git workqueue: make wq_subsys const Now that the driver core can properly handle constant struct bus_type, move the wq_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-and-reviewed-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Signed-off-by: Tejun Heo --- diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 55c9816506b06..695f6f5ad0382 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -6692,7 +6692,7 @@ static struct device_attribute wq_sysfs_unbound_attrs[] = { __ATTR_NULL, }; -static struct bus_type wq_subsys = { +static const struct bus_type wq_subsys = { .name = "workqueue", .dev_groups = wq_sysfs_groups, };