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

Peng Fan (OSS) peng.fan at oss.nxp.com
Thu Oct 29 06:42:27 PDT 2026


From: Peng Fan <peng.fan at 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 at 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




More information about the linux-arm-kernel mailing list