Skip to contentSkip to conversation

gpio: uniphier: Replace of_node_to_fwnode() with more suitable API

PATCH Applied Andy Shevchenko 2 participants 2 messages Aug 22, 2024 – Sep 2, 2024

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

PATCH 1/1 gpio: uniphier: Replace of_node_to_fwnode() with more suitable API

of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API.

---
 drivers/gpio/gpio-uniphier.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpio/gpio-uniphier.c +3 -2
index 1f440707f8f4..da99ba13e82d 100644
@@ -11,6 +11,7 @@
 #include <linux/of.h>
 #include <linux/of_irq.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/spinlock.h>
 #include <dt-bindings/gpio/uniphier-gpio.h>
 
@@ -164,7 +165,7 @@ static int uniphier_gpio_to_irq(struct gpio_chip *chip, unsigned int offset)
 	if (offset < UNIPHIER_GPIO_IRQ_OFFSET)
 		return -ENXIO;
 
-	fwspec.fwnode = of_node_to_fwnode(chip->parent->of_node);
+	fwspec.fwnode = dev_fwnode(chip->parent);
 	fwspec.param_count = 2;
 	fwspec.param[0] = offset - UNIPHIER_GPIO_IRQ_OFFSET;
 	/*
@@ -404,7 +405,7 @@ static int uniphier_gpio_probe(struct platform_device *pdev)
 	priv->domain = irq_domain_create_hierarchy(
 					parent_domain, 0,
 					UNIPHIER_GPIO_IRQ_MAX_NUM,
-					of_node_to_fwnode(dev->of_node),
+					dev_fwnode(dev),
 					&uniphier_gpio_irq_domain_ops, priv);
 	if (!priv->domain)
 		return -ENOMEM;
Signature · 1 line
2.46.0
#1 lore raw

From: Bartosz Golaszewski <[email protected]>

Quoted 4 lines · Andy Shevchenko

of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API.

Applied, thanks!

[1/1] gpio: uniphier: Replace of_node_to_fwnode() with more suitable API

      commit: 0a0d849c70de3949646b242209bcf0e3c488da7d

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>