diff mbox series

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

Message ID 20211223103809.12343-2-andriy.shevchenko@linux.intel.com
State Accepted
Commit 80f60eba9ceea670092f599a6c90ca2cd7794004
Headers show
Series [v1,1/2] gpiolib: acpi: make fwnode take precedence in struct gpio_chip | expand

Commit Message

Andy Shevchenko Dec. 23, 2021, 10:38 a.m. UTC
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(-)

Comments

Serge Semin Dec. 24, 2021, 1:47 p.m. UTC | #1
On Thu, Dec 23, 2021 at 12:38:09PM +0200, Andy Shevchenko wrote:
> 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.

Thanks for the patch.
Acked-by: Serge Semin <fancer.lancer@gmail.com>

-Sergey

> 
> 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
>
Bartosz Golaszewski Jan. 3, 2022, 10:05 a.m. UTC | #2
On Thu, Dec 23, 2021 at 11:38 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> 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>
> ---

Applied, thanks!

Bart
diff mbox series

Patch

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;