linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch: powerpc: ps3: Make ps3_system_bus_type const
@ 2025-09-18 11:48 Adrian Barnaś
  2025-09-18 13:05 ` Greg Kroah-Hartman
  2025-09-19  8:07 ` Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: Adrian Barnaś @ 2025-09-18 11:48 UTC (permalink / raw)
  To: Geoff Levand, Madhavan Srinivasan, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, linuxppc-dev, linux-kernel
  Cc: Greg Kroah-Hartman, Adrian Barnaś

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>
---
 arch/powerpc/platforms/ps3/system-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index afbaabf182d0..c5b880c411ef 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -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,
-- 
2.51.0.470.ga7dc726c21-goog



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-19  8:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 11:48 [PATCH] arch: powerpc: ps3: Make ps3_system_bus_type const Adrian Barnaś
2025-09-18 13:05 ` Greg Kroah-Hartman
2025-09-19  8:07 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).