diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-14 20:15:00 +0100 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-02-27 22:46:35 +0100 |
commit | 2fadeb950f53c017bde9e156e443528265dd3629 (patch) | |
tree | 53dd18e9d17f28372dfe505ad67ebe0b25323477 /lib/kunit | |
parent | kunit: Mark filter* params as rw (diff) | |
download | linux-2fadeb950f53c017bde9e156e443528265dd3629.tar.xz linux-2fadeb950f53c017bde9e156e443528265dd3629.zip |
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/kunit')
-rw-r--r-- | lib/kunit/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kunit/device.c b/lib/kunit/device.c index 644a38a1f5b1..e20641559314 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", }; |