From: Ricardo B. Marliere Date: Sun, 4 Feb 2024 16:02:30 +0000 (-0300) Subject: counter: make counter_bus_type const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6b0828ca8bd18315647511dfe731101b6a59de2b;p=linux.git counter: make counter_bus_type const Now that the driver core can properly handle constant struct bus_type, move the counter_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" Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240204-bus_cleanup-counter-v1-1-cef9dd719bdc@marliere.net Signed-off-by: William Breathitt Gray --- diff --git a/drivers/counter/counter-core.c b/drivers/counter/counter-core.c index 3f24481fc04a1..29df0985f2ba0 100644 --- a/drivers/counter/counter-core.c +++ b/drivers/counter/counter-core.c @@ -54,7 +54,7 @@ static struct device_type counter_device_type = { .release = counter_device_release, }; -static struct bus_type counter_bus_type = { +static const struct bus_type counter_bus_type = { .name = "counter", .dev_name = "counter", };