[PATCH for-next v1 3/3] pinctrl: baytrail: invert if condition

From: Raag Jadav
Date: Fri Jun 16 2023 - 16:35:18 EST


Invert if condition and get rid of redundant else.

Signed-off-by: Raag Jadav <raag.jadav@xxxxxxxxx>
---
drivers/pinctrl/intel/pinctrl-baytrail.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 97ead2c58b66..27aef62fc7c0 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -753,9 +753,7 @@ static void byt_gpio_clear_triggering(struct intel_pinctrl *vg, unsigned int off
value = readl(reg);

/* Do not clear direct-irq enabled IRQs (from gpio_disable_free) */
- if (value & BYT_DIRECT_IRQ_EN)
- /* nothing to do */ ;
- else
+ if (!(value & BYT_DIRECT_IRQ_EN))
value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);

writel(value, reg);
--
2.17.1