From: Ricardo B. Marliere Date: Wed, 14 Feb 2024 19:15:00 +0000 (-0300) Subject: kunit: make kunit_bus_type const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2fadeb950f53c017bde9e156e443528265dd3629;p=linux.git kunit: make kunit_bus_type const Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type a const *"), the driver core can properly handle constant struct bus_type, move the kunit_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 Reviewed-by: David Gow Signed-off-by: Shuah Khan --- diff --git a/lib/kunit/device.c b/lib/kunit/device.c index 644a38a1f5b1c..e206415593149 100644 --- a/lib/kunit/device.c +++ b/lib/kunit/device.c @@ -35,7 +35,7 @@ struct kunit_device { #define to_kunit_device(d) container_of_const(d, struct kunit_device, dev) -static struct bus_type kunit_bus_type = { +static const struct bus_type kunit_bus_type = { .name = "kunit", };