Commit 6d6395cd authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Bartosz Golaszewski

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.
Signed-off-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240822225300.707178-1-andy.shevchenko@gmail.comSigned-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 5482f1a5
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/property.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#define GPIO_RX_DAT 0x0 #define GPIO_RX_DAT 0x0
...@@ -533,7 +534,7 @@ static int thunderx_gpio_probe(struct pci_dev *pdev, ...@@ -533,7 +534,7 @@ static int thunderx_gpio_probe(struct pci_dev *pdev,
chip->set_config = thunderx_gpio_set_config; chip->set_config = thunderx_gpio_set_config;
girq = &chip->irq; girq = &chip->irq;
gpio_irq_chip_set_chip(girq, &thunderx_gpio_irq_chip); 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 = girq->parent_domain =
irq_get_irq_data(txgpio->msix_entries[0].vector)->domain; irq_get_irq_data(txgpio->msix_entries[0].vector)->domain;
girq->child_to_parent_hwirq = thunderx_gpio_child_to_parent_hwirq; girq->child_to_parent_hwirq = thunderx_gpio_child_to_parent_hwirq;
...@@ -549,7 +550,7 @@ static int thunderx_gpio_probe(struct pci_dev *pdev, ...@@ -549,7 +550,7 @@ static int thunderx_gpio_probe(struct pci_dev *pdev,
for (i = 0; i < ngpio; i++) { for (i = 0; i < ngpio; i++) {
struct irq_fwspec fwspec; struct irq_fwspec fwspec;
fwspec.fwnode = of_node_to_fwnode(dev->of_node); fwspec.fwnode = dev_fwnode(dev);
fwspec.param_count = 2; fwspec.param_count = 2;
fwspec.param[0] = i; fwspec.param[0] = i;
fwspec.param[1] = IRQ_TYPE_NONE; fwspec.param[1] = IRQ_TYPE_NONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment