[PATCH v1 3/3] mmc: core: increase shutdown priority for MMC devices

From: Oleksij Rempel
Date: Fri Nov 24 2023 - 09:53:54 EST


Set a higher shutdown priority for MMC devices. By introducing a call to
This adjustment ensures that MMC storage devices are prioritized during the
system shutdown process, aligning with the critical nature of storage
devices in maintaining data integrity and preventing potential data loss
or corruption during emergency shutdown scenarios.

Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
drivers/mmc/core/bus.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 0af96548e7da..90a40fe8d16f 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -128,6 +128,8 @@ static int mmc_bus_probe(struct device *dev)
struct mmc_driver *drv = to_mmc_driver(dev->driver);
struct mmc_card *card = mmc_dev_to_card(dev);

+ dev_set_shutdown_priority(dev, DEVICE_SHUTDOWN_PRIO_STORAGE);
+
return drv->probe(card);
}

--
2.39.2