Skip to contentSkip to conversation

mmc: pwrseq: Use device_match_of_node()

PATCH In review [email protected] 2 participants 2 messages Nov 17, 2022 – Nov 18, 2022 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: pwrseq: Use device_match_of_node()

From: ye xingchen <[email protected]>

Replace the open-code with device_match_of_node().

---
 drivers/mmc/core/pwrseq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/pwrseq.c +1 -1
index ef675f364bf0..2374669b588a 100644
@@ -29,7 +29,7 @@ int mmc_pwrseq_alloc(struct mmc_host *host)
 
 	mutex_lock(&pwrseq_list_mutex);
 	list_for_each_entry(p, &pwrseq_list, pwrseq_node) {
-		if (p->dev->of_node == np) {
+		if (device_match_of_node(p->dev, np)) {
 			if (!try_module_get(p->owner))
 				dev_err(host->parent,
 					"increasing module refcount failed\n");
Signature · 1 line
2.25.1
#1 lore raw
Quoted 6 lines · On Thu, 17 Nov 2022 at 08:24, <[email protected]> wrote:

From: ye xingchen <[email protected]>

Replace the open-code with device_match_of_node().

Applied for next, thanks!

Kind regards
Uffe

Quoted 19 lines
---
 drivers/mmc/core/pwrseq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/pwrseq.c +1 -2
index ef675f364bf0..2374669b588a 100644
@@ -29,7 +29,7 @@ int mmc_pwrseq_alloc(struct mmc_host *host)
 
        mutex_lock(&pwrseq_list_mutex);
        list_for_each_entry(p, &pwrseq_list, pwrseq_node) {
-               if (p->dev->of_node == np) {
+               if (device_match_of_node(p->dev, np)) {
                        if (!try_module_get(p->owner))
                                dev_err(host->parent,
                                        "increasing module refcount failed\n");
--

2.25.1