Skip to contentSkip to conversation

pinctrl: core: Use device_match_of_node() helper

PATCH In review Andy Shevchenko 2 participants 3 messages Jun 29, 2022 – Jul 11, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: core: Use device_match_of_node() helper

Instead of open coding, use device_match_of_node() helper.

---
 drivers/pinctrl/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/core.c +1 -1
index ffe39336fcac..9e57f4c62e60 100644
@@ -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;
 		}
Signature · 1 line
2.35.1
#1 lore raw
Quoted 1 line · Andy Shevchenko

Instead of open coding, use device_match_of_node() helper.

Any comments?

Signature · 2 lines
With Best Regards,
Andy Shevchenko