Skip to contentSkip to conversation

gpio: thunderx: 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: thunderx: 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-thunderx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpio/gpio-thunderx.c +3 -2
index 8521c6aacace..5b851e904c11 100644
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/property.h>
 #include <linux/spinlock.h>
 
 #define GPIO_RX_DAT	0x0
@@ -533,7 +534,7 @@ static int thunderx_gpio_probe(struct pci_dev *pdev,
 	chip->set_config = thunderx_gpio_set_config;
 	girq = &chip->irq;
 	gpio_irq_chip_set_chip(girq, &thunderx_gpio_irq_chip);
-	girq->fwnode = of_node_to_fwnode(dev->of_node);
+	girq->fwnode = dev_fwnode(dev);
 	girq->parent_domain =
 		irq_get_irq_data(txgpio->msix_entries[0].vector)->domain;
 	girq->child_to_parent_hwirq = thunderx_gpio_child_to_parent_hwirq;
@@ -549,7 +550,7 @@ static int thunderx_gpio_probe(struct pci_dev *pdev,
 	for (i = 0; i < ngpio; i++) {
 		struct irq_fwspec fwspec;
 
-		fwspec.fwnode = of_node_to_fwnode(dev->of_node);
+		fwspec.fwnode = dev_fwnode(dev);
 		fwspec.param_count = 2;
 		fwspec.param[0] = i;
 		fwspec.param[1] = IRQ_TYPE_NONE;
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: thunderx: Replace of_node_to_fwnode() with more suitable API

      commit: fd7f4d67469d701f5f5fbdfdb94875fbe8b5ad15

Best regards,

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