All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] pinctrl: core: Use device_match_of_node() helper
@ 2022-06-29 11:58 Andy Shevchenko
  2022-07-06 12:17 ` Andy Shevchenko
  2022-07-11 12:08 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-06-29 11:58 UTC (permalink / raw)
  To: linux-gpio, linux-kernel; +Cc: Linus Walleij, Andy Shevchenko

Instead of open coding, use device_match_of_node() helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index ffe39336fcac..9e57f4c62e60 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -126,7 +126,7 @@ struct pinctrl_dev *get_pinctrl_dev_from_of_node(struct device_node *np)
 	mutex_lock(&pinctrldev_list_mutex);
 
 	list_for_each_entry(pctldev, &pinctrldev_list, node)
-		if (pctldev->dev->of_node == np) {
+		if (device_match_of_node(pctldev->dev, np)) {
 			mutex_unlock(&pinctrldev_list_mutex);
 			return pctldev;
 		}
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-11 12:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 11:58 [PATCH v1 1/1] pinctrl: core: Use device_match_of_node() helper Andy Shevchenko
2022-07-06 12:17 ` Andy Shevchenko
2022-07-11 12:08 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.