Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: pseries: make suspend_subsys const

Because driver core can properly handle constant struct bus_type,
move the suspend_subsys to be a constant structure as well, placing it into
read-only memory which can not be modified at runtime.

Signed-off-by: Adrian Barnaś <abarnas@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20250918140816.335916-2-abarnas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Adrian Barnaś and committed by
Greg Kroah-Hartman
6848990d 4c987d67

+1 -1
+1 -1
arch/powerpc/platforms/pseries/suspend.c
··· 126 126 127 127 static DEVICE_ATTR(hibernate, 0644, show_hibernate, store_hibernate); 128 128 129 - static struct bus_type suspend_subsys = { 129 + static const struct bus_type suspend_subsys = { 130 130 .name = "power", 131 131 .dev_name = "power", 132 132 };