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

index 2c07387201d0dd526dfa181405c42498ea3bf4f1..733b512992c04f40a6cc27ab82e60f53941b3e5c 100644 (file)
@@ -464,7 +464,7 @@ void spu_init_channels(struct spu *spu)
 }
 EXPORT_SYMBOL_GPL(spu_init_channels);
 
-static struct bus_type spu_subsys = {
+static const struct bus_type spu_subsys = {
        .name = "spu",
        .dev_name = "spu",
 };