aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRicardo B. Marliere <ricardo@marliere.net>2024-02-14 16:15:00 -0300
committerShuah Khan <skhan@linuxfoundation.org>2024-02-27 14:46:35 -0700
commit2fadeb950f53c017bde9e156e443528265dd3629 (patch)
tree53dd18e9d17f28372dfe505ad67ebe0b25323477 /lib
parenta0dd82d6d863f03859ccab6c71e84e917f4d7082 (diff)
downloadlinux-2fadeb950f53c017bde9e156e443528265dd3629.tar.gz
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 <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/kunit/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kunit/device.c b/lib/kunit/device.c
index 644a38a1f5b1cf..e2064155931492 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",
};