summaryrefslogtreecommitdiff
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorRicardo B. Marliere <ricardo@marliere.net>2024-02-03 16:02:01 -0300
committerUlf Hansson <ulf.hansson@linaro.org>2024-02-13 13:37:28 +0100
commit1ba28dee4b88f14887d0a6981bce80c5885f34c2 (patch)
tree8c51103d7c36462106a2be98e84647d36da3a1df /drivers/mmc/core
parent6bf26a0e5e9b11f7f4a614e539b9ed511e2fc0cd (diff)
mmc: core: make mmc_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the mmc_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: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240203-bus_cleanup-mmc-v1-2-ad054dce8dc3@marliere.net Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 0af96548e7da..48daeafdff7a 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -214,7 +214,7 @@ static const struct dev_pm_ops mmc_bus_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(mmc_bus_suspend, mmc_bus_resume)
};
-static struct bus_type mmc_bus_type = {
+static const struct bus_type mmc_bus_type = {
.name = "mmc",
.dev_groups = mmc_dev_groups,
.uevent = mmc_bus_uevent,