From: Ricardo B. Marliere Date: Sun, 4 Feb 2024 15:19:50 +0000 (-0300) Subject: sparc: vio: make vio_bus_type const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=079431ea9ed3eef871b7b92bb02d411020000679;p=linux.git sparc: vio: make vio_bus_type const Now that the driver core can properly handle constant struct bus_type, move the vio_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Greg Kroah-Hartman Acked-by: Sam Ravnborg Signed-off-by: Andreas Larsson Link: https://lore.kernel.org/r/20240204-bus_cleanup-sparc-v1-1-4ca7fe8de5f7@marliere.net --- diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c index b78df3a15a72e..846a55f942d4e 100644 --- a/arch/sparc/kernel/vio.c +++ b/arch/sparc/kernel/vio.c @@ -149,7 +149,7 @@ static struct attribute *vio_dev_attrs[] = { }; ATTRIBUTE_GROUPS(vio_dev); -static struct bus_type vio_bus_type = { +static const struct bus_type vio_bus_type = { .name = "vio", .dev_groups = vio_dev_groups, .uevent = vio_hotplug,