aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Holland <[email protected]>2023-07-24 17:40:39 -0700
committerBartosz Golaszewski <[email protected]>2023-07-25 11:59:58 +0200
commit5d472a7ef0f35e39906ef0eafa0c76727949f56b (patch)
treeebedfc3b9e3f65a63a8013d271f91585e5d1faa7
parent6a270bbd3a74c432b867214044377ccfcdb5ddc4 (diff)
gpio: sifive: Directly use the device's fwnode
There is no need to convert dev->of_node back to a fwnode_handle. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
-rw-r--r--drivers/gpio/gpio-sifive.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c
index efab7b58f739..a1b5bae05a35 100644
--- a/drivers/gpio/gpio-sifive.c
+++ b/drivers/gpio/gpio-sifive.c
@@ -10,6 +10,7 @@
#include <linux/gpio/driver.h>
#include <linux/init.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/regmap.h>
@@ -255,7 +256,7 @@ static int sifive_gpio_probe(struct platform_device *pdev)
chip->gc.owner = THIS_MODULE;
girq = &chip->gc.irq;
gpio_irq_chip_set_chip(girq, &sifive_gpio_irqchip);
- girq->fwnode = of_node_to_fwnode(node);
+ girq->fwnode = dev_fwnode(dev);
girq->parent_domain = parent;
girq->child_to_parent_hwirq = sifive_gpio_child_to_parent_hwirq;
girq->handler = handle_bad_irq;