Thread (19 messages) 19 messages, 3 authors, 3d ago

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

flat view
WARM3d

From: Peng Fan (OSS) <hidden>
Date: 2026-10-29 13:45:59
Also in: imx, linux-devicetree, linux-gpio, lkml
Subsystem: gpio subsystem, the rest · Maintainers: Linus Walleij, Bartosz Golaszewski, Linus Torvalds

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help