[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZK91G1qd8JwFEpIX@makrotopia.org>
Date: Thu, 13 Jul 2023 04:52:59 +0100
From: Daniel Golle <daniel@...rotopia.org>
To: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
Ulf Hansson <ulf.hansson@...aro.org>,
Ye Bin <yebin10@...wei.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Seunghui Lee <sh043.lee@...sung.com>
Subject: [PATCH] mmc: core: set card fwnode_handle
Also set card's device fwnode in case it isn't set yet and of_node is
present.
Signed-off-by: Daniel Golle <daniel@...rotopia.org>
---
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 2c3074a605fc4..ecf6e23e4c307 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -361,6 +361,8 @@ int mmc_add_card(struct mmc_card *card)
mmc_add_card_debugfs(card);
card->dev.of_node = mmc_of_find_child_device(card->host, 0);
+ if (card->dev.of_node && !card->dev.fwnode)
+ card->dev.fwnode = &card->dev.of_node->fwnode;
device_enable_async_suspend(&card->dev);
--
2.41.0
Powered by blists - more mailing lists