diff mbox series

[v3,02/11] gpio: vf610: simplify with irq_set_irq_wake()

Message ID 20261105-gpio-vf610-fixes-v3-2-504e19de5ad5@nxp.com
State New
Headers show
Series gpio: vf610: fix clocks and misc cleanup | expand

Commit Message

Peng Fan (OSS) Nov. 5, 2026, 3:53 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

Replace the manual enable/disable irq wake logic with a single call to
irq_set_irq_wake() to simplify code.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/gpio/gpio-vf610.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Frank Li Nov. 5, 2026, 5:23 p.m. UTC | #1
On Thu, Nov 05, 2026 at 11:53:00AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Replace the manual enable/disable irq wake logic with a single call to
> irq_set_irq_wake() to simplify code.
>
> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/gpio/gpio-vf610.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
> index adfa2c2d5873..c1c562071c0d 100644
> --- a/drivers/gpio/gpio-vf610.c
> +++ b/drivers/gpio/gpio-vf610.c
> @@ -189,10 +189,7 @@ static int vf610_gpio_irq_set_wake(struct irq_data *d, u32 enable)
>  	struct vf610_gpio_port *port =
>  		gpiochip_get_data(irq_data_get_irq_chip_data(d));
>
> -	if (enable)
> -		enable_irq_wake(port->irq);
> -	else
> -		disable_irq_wake(port->irq);
> +	irq_set_irq_wake(port->irq, enable);
>
>  	return 0;
>  }
>
> --
> 2.51.0
>
>
Linus Walleij Nov. 6, 2026, 1:28 p.m. UTC | #2
On Thu, Nov 5, 2026 at 4:56 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:

> From: Peng Fan <peng.fan@nxp.com>
>
> Replace the manual enable/disable irq wake logic with a single call to
> irq_set_irq_wake() to simplify code.
>
> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index adfa2c2d5873..c1c562071c0d 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -189,10 +189,7 @@  static int vf610_gpio_irq_set_wake(struct irq_data *d, u32 enable)
 	struct vf610_gpio_port *port =
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 
-	if (enable)
-		enable_irq_wake(port->irq);
-	else
-		disable_irq_wake(port->irq);
+	irq_set_irq_wake(port->irq, enable);
 
 	return 0;
 }