diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-06-01 19:21:28 +0300 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2021-06-02 15:34:29 +0200 |
commit | bd56b051c96b9e0bbfaa7f79d3fad385fae2ac4b (patch) | |
tree | c6943e1dbe71a1a8caf98c88ae3ab68715192265 /drivers/gpio/gpio-dwapb.c | |
parent | 5a5bc826fed1d86212eb78114c86808c29b11b0a (diff) |
gpio: dwapb: Switch to use fwnode_irq_get()
We have open coded variant of fwnode_irq_get() in dwapb_get_irq().
Replace it with a simple call.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpio-dwapb.c')
-rw-r--r-- | drivers/gpio/gpio-dwapb.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index 939701c1465e..7d61f5821e32 100644 --- a/drivers/gpio/gpio-dwapb.c +++ b/drivers/gpio/gpio-dwapb.c @@ -528,17 +528,13 @@ static int dwapb_gpio_add_port(struct dwapb_gpio *gpio, static void dwapb_get_irq(struct device *dev, struct fwnode_handle *fwnode, struct dwapb_port_property *pp) { - struct device_node *np = NULL; - int irq = -ENXIO, j; - - if (fwnode_property_read_bool(fwnode, "interrupt-controller")) - np = to_of_node(fwnode); + int irq, j; for (j = 0; j < pp->ngpio; j++) { - if (np) - irq = of_irq_get(np, j); - else if (has_acpi_companion(dev)) + if (has_acpi_companion(dev)) irq = platform_get_irq_optional(to_platform_device(dev), j); + else + irq = fwnode_irq_get(fwnode, j); if (irq > 0) pp->irq[j] = irq; } |