kunit: make kunit_bus_type const
authorRicardo B. Marliere <ricardo@marliere.net>
Wed, 14 Feb 2024 19:15:00 +0000 (16:15 -0300)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 27 Feb 2024 21:46:35 +0000 (14:46 -0700)
commit2fadeb950f53c017bde9e156e443528265dd3629
tree53dd18e9d17f28372dfe505ad67ebe0b25323477
parenta0dd82d6d863f03859ccab6c71e84e917f4d7082
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>
lib/kunit/device.c