[PATCH v1 3/4] pinctrl: ma35: Replace open coded fwnode_is_gpiochip()

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon Aug 24 00:42:34 PDT 2026


Since GPIOLIB provides a helper, no need to open code it, hence
replace that piece by fwnode_is_gpiochip().

Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
---
 drivers/pinctrl/nuvoton/pinctrl-ma35.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-ma35.c b/drivers/pinctrl/nuvoton/pinctrl-ma35.c
index dafa85c105a1..922b727c4b6c 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-ma35.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-ma35.c
@@ -1075,7 +1075,7 @@ static int ma35_pinctrl_probe_dt(struct platform_device *pdev, struct ma35_pinct
 	int ret;
 
 	device_for_each_child_node(dev, child) {
-		if (fwnode_property_present(child, "gpio-controller"))
+		if (fwnode_is_gpiochip(child))
 			continue;
 
 		npctl->nfunctions++;
@@ -1096,7 +1096,7 @@ static int ma35_pinctrl_probe_dt(struct platform_device *pdev, struct ma35_pinct
 		return -ENOMEM;
 
 	device_for_each_child_node(dev, child) {
-		if (fwnode_property_present(child, "gpio-controller"))
+		if (fwnode_is_gpiochip(child))
 			continue;
 
 		ret = ma35_pinctrl_parse_functions(child, npctl, idx++);
-- 
2.50.1




More information about the linux-arm-kernel mailing list