]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arch: powerpc: ps3: Make ps3_system_bus_type const
authorAdrian Barnaś <abarnas@google.com>
Thu, 18 Sep 2025 11:48:40 +0000 (11:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Oct 2025 05:55:05 +0000 (07:55 +0200)
Because driver core can properly handle constant struct bus_type,
move the ps3_system_bus_type 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: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Geoff Levand <geoff@infradead.org>
Link: https://patch.msgid.link/20250918114840.53581-1-abarnas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/ps3/system-bus.c

index afbaabf182d013e7f4d535dacc68db313c202e9e..c5b880c411efd948e20e62cdc6b49a79b8d36741 100644 (file)
@@ -465,7 +465,7 @@ static struct attribute *ps3_system_bus_dev_attrs[] = {
 };
 ATTRIBUTE_GROUPS(ps3_system_bus_dev);
 
-static struct bus_type ps3_system_bus_type = {
+static const struct bus_type ps3_system_bus_type = {
        .name = "ps3_system_bus",
        .match = ps3_system_bus_match,
        .uevent = ps3_system_bus_uevent,