From: Ricardo B. Marliere Date: Sun, 4 Feb 2024 13:40:15 +0000 (-0300) Subject: clocksource: Make clocksource_subsys const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2bc7fc24f9a85cb6b7335354b2733615727689f6;p=linux.git clocksource: Make clocksource_subsys const Now that the driver core can properly handle constant struct bus_type, move the clocksource_subsys 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 Signed-off-by: Ricardo B. Marliere Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Acked-by: John Stultz Link: https://lore.kernel.org/r/20240204-bus_cleanup-time-v1-1-207ec18e24b8@marliere.net --- diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 3052b1f1168e2..4ef06651ad079 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -1468,7 +1468,7 @@ static struct attribute *clocksource_attrs[] = { }; ATTRIBUTE_GROUPS(clocksource); -static struct bus_type clocksource_subsys = { +static const struct bus_type clocksource_subsys = { .name = "clocksource", .dev_name = "clocksource", };