From c65f52fc475df49ebba4152e1c2927883bf8fd37 Mon Sep 17 00:00:00 2001 From: "Ricardo B. Marliere" Date: Sun, 4 Feb 2024 17:00:13 -0300 Subject: [PATCH] ipack: make ipack_bus_type const Now that the driver core can properly handle constant struct bus_type, move the ipack_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman Signed-off-by: "Ricardo B. Marliere" Acked-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20240204-bus_cleanup-ipack-v1-1-aef5e8f84d01@marliere.net Signed-off-by: Greg Kroah-Hartman --- drivers/ipack/ipack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c index b1471ba016a5..866bf48d803b 100644 --- a/drivers/ipack/ipack.c +++ b/drivers/ipack/ipack.c @@ -187,7 +187,7 @@ static struct attribute *ipack_attrs[] = { }; ATTRIBUTE_GROUPS(ipack); -static struct bus_type ipack_bus_type = { +static const struct bus_type ipack_bus_type = { .name = "ipack", .probe = ipack_bus_probe, .match = ipack_bus_match,