Re: [PATCH 03/11] gpio: vf610: simplify with irq_set_irq_wake

From
Frank Li <hidden>
Date
2026-10-29 14:47:08
Also in
imx, linux-arm-kernel, linux-gpio, lkml
Reply to
Peng Fan (OSS), 2026-10-29
On Thu, Oct 29, 2026 at 09:42:27PM +0800, Peng Fan (OSS) wrote:

subject: need () after irq_set_irq_wake

Frank
quoted hunk ↗ jump to hunk
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.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/gpio/gpio-vf610.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index 44b846ff1b93..eccc79a4d96b 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -188,14 +188,8 @@ 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));
-	int ret;
-
-	if (enable)
-		ret = enable_irq_wake(port->irq);
-	else
-		ret = disable_irq_wake(port->irq);

-	return ret;
+	return irq_set_irq_wake(port->irq, enable);
 }

 static const struct irq_chip vf610_irqchip = {

--
2.51.0
Thread (22 messages) 22 messages, 5 authors, last reply 10d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help