mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] extcon: Use device_match_of_node()
@ 2022-11-25  7:22 ye.xingchen
  0 siblings, 0 replies; only message in thread
From: ye.xingchen @ 2022-11-25  7:22 UTC (permalink / raw)
  To: cw00.choi; +Cc: myungjoo.ham, linux-kernel

From: ye xingchen <ye.xingchen@zte.com.cn>

Replace the open-code with device_match_of_node().

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/extcon/extcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index e1c71359b605..cdf1c8c9973e 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -1349,7 +1349,7 @@ struct extcon_dev *extcon_find_edev_by_node(struct device_node *node)

 	mutex_lock(&extcon_dev_list_lock);
 	list_for_each_entry(edev, &extcon_dev_list, entry)
-		if (edev->dev.parent && edev->dev.parent->of_node == node)
+		if (edev->dev.parent && device_match_of_node(edev->dev.parent, node))
 			goto out;
 	edev = ERR_PTR(-EPROBE_DEFER);
 out:
-- 
2.25.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-25  7:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25  7:22 [PATCH] extcon: Use device_match_of_node() ye.xingchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®