gpio: dwapb: Switch to use fwnode instead of of_node
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 23 Dec 2021 10:38:09 +0000 (12:38 +0200)
committerBartosz Golaszewski <brgl@bgdev.pl>
Mon, 3 Jan 2022 10:06:18 +0000 (11:06 +0100)
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>
Acked-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-dwapb.c

index ec0767d7800dc50adf3df2906826ac05f97bbca0..b0f3aca61974c1d16708ebd64c43d052faaddf44 100644 (file)
@@ -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;