Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240822225300.707178-1-andy.shevchenko@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Andy Shevchenko and committed by
Bartosz Golaszewski
6d6395cd 5482f1a5

+3 -2
+3 -2
drivers/gpio/gpio-thunderx.c
··· 14 14 #include <linux/kernel.h> 15 15 #include <linux/module.h> 16 16 #include <linux/pci.h> 17 + #include <linux/property.h> 17 18 #include <linux/spinlock.h> 18 19 19 20 #define GPIO_RX_DAT 0x0 ··· 534 533 chip->set_config = thunderx_gpio_set_config; 535 534 girq = &chip->irq; 536 535 gpio_irq_chip_set_chip(girq, &thunderx_gpio_irq_chip); 537 - girq->fwnode = of_node_to_fwnode(dev->of_node); 536 + girq->fwnode = dev_fwnode(dev); 538 537 girq->parent_domain = 539 538 irq_get_irq_data(txgpio->msix_entries[0].vector)->domain; 540 539 girq->child_to_parent_hwirq = thunderx_gpio_child_to_parent_hwirq; ··· 550 549 for (i = 0; i < ngpio; i++) { 551 550 struct irq_fwspec fwspec; 552 551 553 - fwspec.fwnode = of_node_to_fwnode(dev->of_node); 552 + fwspec.fwnode = dev_fwnode(dev); 554 553 fwspec.param_count = 2; 555 554 fwspec.param[0] = i; 556 555 fwspec.param[1] = IRQ_TYPE_NONE;