aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo B. Marliere <[email protected]>2024-02-04 10:40:16 -0300
committerThomas Gleixner <[email protected]>2024-02-07 15:11:24 +0100
commit49f1ff50d49fb8b40bc0271177de8092226396e9 (patch)
tree78b14ec3e2d18acf4636752b1b0f96688b4f7a2a
parent2bc7fc24f9a85cb6b7335354b2733615727689f6 (diff)
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 <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--kernel/time/clockevents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 960143b183cd..a7ca458cdd9c 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",
};