powerpc: cell: make spu_subsys const
Subsystems (2)
PATCH 1/1 powerpc: cell: make spu_subsys const
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ś <[email protected]>
--- arch/powerpc/platforms/cell/spu_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/cell/spu_base.c +1 -1
@@ -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" , };
Signature · 1 line
2.51.0.470.ga7dc726c21-goog
Quoted 25 lines · Adrian Barnaś
Because driver core can properly handle constant struct
bus_type, move thespu_subsysto be a constant structure as well, placing it into read-only memory which can not be modified at runtime.Signed-off-by Adrian Barnaś <[email protected]>--- arch/powerpc/platforms/cell/spu_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/platforms/cell/spu_base.c +1
-1@@ -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" , };Signature · 1 line
2.51.0.470.ga7dc726c21-goog
Reviewed-by Greg Kroah-Hartman <[email protected]>