From: Ricardo B. Marliere Date: Sun, 4 Feb 2024 13:40:16 +0000 (-0300) Subject: clockevents: Make clockevents_subsys const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=49f1ff50d49fb8b40bc0271177de8092226396e9;p=linux.git clockevents: Make clockevents_subsys const Now that the driver core can properly handle constant struct bus_type, move the clockevents_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 Link: https://lore.kernel.org/r/20240204-bus_cleanup-time-v1-2-207ec18e24b8@marliere.net --- diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 960143b183cdb..a7ca458cdd9cd 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -659,7 +659,7 @@ void tick_cleanup_dead_cpu(int cpu) #endif #ifdef CONFIG_SYSFS -static struct bus_type clockevents_subsys = { +static const struct bus_type clockevents_subsys = { .name = "clockevents", .dev_name = "clockevent", };