Skip to content

Commit 469f6ac

Browse files
rbmarlierearndb
authored andcommitted
tee: make tee_bus_type const
Since commit d492cc2 ("driver core: device.h: make struct bus_type a const *"), the driver core can properly handle constant struct bus_type, move the tee_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 <[email protected]> Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Jens Wiklander <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 19a4eaa commit 469f6ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/tee/tee_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ static int tee_client_device_uevent(const struct device *dev,
12261226
return add_uevent_var(env, "MODALIAS=tee:%pUb", dev_id);
12271227
}
12281228

1229-
struct bus_type tee_bus_type = {
1229+
const struct bus_type tee_bus_type = {
12301230
.name = "tee",
12311231
.match = tee_client_device_match,
12321232
.uevent = tee_client_device_uevent,

include/linux/tee_drv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ static inline bool tee_param_is_memref(struct tee_param *param)
482482
}
483483
}
484484

485-
extern struct bus_type tee_bus_type;
485+
extern const struct bus_type tee_bus_type;
486486

487487
/**
488488
* struct tee_client_device - tee based device

0 commit comments

Comments
 (0)