mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 02:15:57 +00:00
bus: mhi: host: make mhi_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the mhi_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kunwu Chan <chentao@kylinos.cn> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20240823031129.49010-1-kunwu.chan@linux.dev Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
This commit is contained in:
parent
bfc5ca0fd1
commit
8e54acedff
@ -1464,7 +1464,7 @@ static int mhi_match(struct device *dev, const struct device_driver *drv)
|
|||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bus_type mhi_bus_type = {
|
const struct bus_type mhi_bus_type = {
|
||||||
.name = "mhi",
|
.name = "mhi",
|
||||||
.dev_name = "mhi",
|
.dev_name = "mhi",
|
||||||
.match = mhi_match,
|
.match = mhi_match,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
|
|
||||||
extern struct bus_type mhi_bus_type;
|
extern const struct bus_type mhi_bus_type;
|
||||||
|
|
||||||
/* Host request register */
|
/* Host request register */
|
||||||
#define MHI_SOC_RESET_REQ_OFFSET 0xb0
|
#define MHI_SOC_RESET_REQ_OFFSET 0xb0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user