[PATCH v2 2/2] gpio: mxc: use BIT() macro

Alexander Stein alexander.stein at ew.tq-group.com
Mon May 25 23:35:02 PDT 2026


Replace the open-code with the BIT() macro.

Signed-off-by: Alexander Stein <alexander.stein at ew.tq-group.com>
Reviewed-by: Frank Li <Frank.Li at nxp.com>
---
Changes in v2:
* Improved commit message as suggested by Frank
* Collected Frank's

 drivers/gpio/gpio-mxc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 12f11a6c96653..7e2690d92df6f 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -330,13 +330,13 @@ static int gpio_set_wake_irq(struct irq_data *d, u32 enable)
 			ret = enable_irq_wake(port->irq_high);
 		else
 			ret = enable_irq_wake(port->irq);
-		port->wakeup_pads |= (1 << gpio_idx);
+		port->wakeup_pads |= BIT(gpio_idx);
 	} else {
 		if (port->irq_high && (gpio_idx >= 16))
 			ret = disable_irq_wake(port->irq_high);
 		else
 			ret = disable_irq_wake(port->irq);
-		port->wakeup_pads &= ~(1 << gpio_idx);
+		port->wakeup_pads &= ~BIT(gpio_idx);
 	}
 
 	return ret;
-- 
2.43.0




More information about the linux-arm-kernel mailing list