summaryrefslogtreecommitdiff
path: root/include/linux/cpu.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-05 13:26:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-31 02:57:50 +0300
commit3a480d4bb5b1e1f09426223e68acaa90da32e384 (patch)
tree5f8e62c26bd4dea58a01fcedd9d527373d7de0f1 /include/linux/cpu.h
parent05d8f255867e3196565bb31a911a437697fab094 (diff)
downloadlinux-3a480d4bb5b1e1f09426223e68acaa90da32e384.tar.xz
driver core: cpu: make cpu_subsys const
Now that the driver core can properly handle constant struct bus_type, move the cpu_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/2024010548-crane-snooze-a871@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/cpu.h')
-rw-r--r--include/linux/cpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index dcb89c987164..0b993a140946 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -128,7 +128,7 @@ static inline void cpu_maps_update_done(void)
static inline int add_cpu(unsigned int cpu) { return 0;}
#endif /* CONFIG_SMP */
-extern struct bus_type cpu_subsys;
+extern const struct bus_type cpu_subsys;
extern int lockdep_is_cpus_held(void);