]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
powerpc: pseries: make cmm_subsys const
authorAdrian Barnaś <abarnas@google.com>
Thu, 18 Sep 2025 14:08:16 +0000 (14:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Oct 2025 05:59:57 +0000 (07:59 +0200)
Because driver core can properly handle constant struct bus_type,
move the cmm_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-3-abarnas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/pseries/cmm.c

index 0823fa2da15162f2213e4943400dfa1e81d5d708..502133979e22899faa9726554528171c6bd0d6ae 100644 (file)
@@ -375,7 +375,7 @@ static struct device_attribute *cmm_attrs[] = {
 static DEVICE_ULONG_ATTR(simulate_loan_target_kb, 0644,
                         simulate_loan_target_kb);
 
-static struct bus_type cmm_subsys = {
+static const struct bus_type cmm_subsys = {
        .name = "cmm",
        .dev_name = "cmm",
 };