[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230616203356.27343-4-raag.jadav@intel.com>
Date: Sat, 17 Jun 2023 02:03:56 +0530
From: Raag Jadav <raag.jadav@...el.com>
To: linus.walleij@...aro.org, mika.westerberg@...ux.intel.com,
andriy.shevchenko@...ux.intel.com
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
mallikarjunappa.sangannavar@...el.com, pandith.n@...el.com,
Raag Jadav <raag.jadav@...el.com>
Subject: [PATCH for-next v1 3/3] pinctrl: baytrail: invert if condition
Invert if condition and get rid of redundant else.
Signed-off-by: Raag Jadav <raag.jadav@...el.com>
---
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
Powered by blists - more mailing lists