mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
kunit: make kunit_bus_type const
Since commit d492cc2573
("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>
This commit is contained in:
parent
a0dd82d6d8
commit
2fadeb950f
@ -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",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user