From: Ricardo B. Marliere Date: Sun, 4 Feb 2024 14:32:29 +0000 (-0300) Subject: x86/mce: Make mce_subsys const X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a6a789165bbdb506b784f53b7467dbe0210494ad;p=users%2Fjedix%2Flinux-maple.git x86/mce: Make mce_subsys const Now that the driver core can properly handle constant struct bus_type, make mce_subsys a constant structure. Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240204-bus_cleanup-x86-v1-1-4e7171be88e8@marliere.net --- diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index bc39252bc54f..a2f78f64798a 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -2431,7 +2431,7 @@ static void mce_enable_ce(void *all) __mcheck_cpu_init_timer(); } -static struct bus_type mce_subsys = { +static const struct bus_type mce_subsys = { .name = "machinecheck", .dev_name = "machinecheck", };