bus: mhi: host: make mhi_bus_type const
authorKunwu Chan <chentao@kylinos.cn>
Fri, 23 Aug 2024 03:11:28 +0000 (11:11 +0800)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Mon, 26 Aug 2024 08:28:27 +0000 (13:58 +0530)
commit8e54acedff45f40f5e11bf2d9ef7f48dd33b4ef9
tree0813867f9d69e73ddfcd95e149347cf6a80c95d2
parentbfc5ca0fd1ea7aceae0b682fa4bd8079c52f96c8
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>
drivers/bus/mhi/host/init.c
drivers/bus/mhi/host/internal.h