Thread (6 messages) 6 messages, 4 authors, 2022-01-03
STALE1617d

[PATCH v1 2/2] gpio: dwapb: Switch to use fwnode instead of of_node

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2021-12-23 10:38:12
Also in: linux-acpi, lkml
Subsystem: gpio subsystem, synopsys designware apb gpio driver, the rest · Maintainers: Linus Walleij, Bartosz Golaszewski, Hoan Tran, Linus Torvalds

GPIO library now accepts fwnode as a firmware node, so
switch the driver to use it and hence rectify the ACPI
case which uses software nodes.

Note, in this case it's rather logical fix that doesn't
affect functionality, thus no backporting required.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-dwapb.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index ec0767d7800d..b0f3aca61974 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -15,7 +15,6 @@
 #include <linux/irq.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/property.h>
 #include <linux/reset.h>
@@ -515,9 +514,7 @@ static int dwapb_gpio_add_port(struct dwapb_gpio *gpio,
 		return err;
 	}
 
-#ifdef CONFIG_OF_GPIO
-	port->gc.of_node = to_of_node(pp->fwnode);
-#endif
+	port->gc.fwnode = pp->fwnode;
 	port->gc.ngpio = pp->ngpio;
 	port->gc.base = pp->gpio_base;
 
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help