[v1,1/1] pinctrl: intel: No need to disable IRQs in the handler

Message ID 20210304105432.36544-1-andriy.shevchenko@linux.intel.com
State New
Headers show
Series
  • [v1,1/1] pinctrl: intel: No need to disable IRQs in the handler
Related show

Commit Message

Andy Shevchenko March 4, 2021, 10:54 a.m.
In IRQ handler interrupts are already disabled, hence no need
to repeat it. Even in the threaded case, which is disabled here,
it is not a problem because IRQ framework serializes descriptor
handling. Remove disabling IRQ part in the handler.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-intel.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Andy Shevchenko March 4, 2021, 3:41 p.m. | #1
On Thu, Mar 04, 2021 at 01:18:09PM +0200, Mika Westerberg wrote:
> On Thu, Mar 04, 2021 at 12:54:32PM +0200, Andy Shevchenko wrote:

> > In IRQ handler interrupts are already disabled, hence no need

> > to repeat it. Even in the threaded case, which is disabled here,

> > it is not a problem because IRQ framework serializes descriptor

> > handling. Remove disabling IRQ part in the handler.

> > 

> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 

> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>


Pushed to my review and testing queue, thanks!

-- 
With Best Regards,
Andy Shevchenko

Patch

diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 93237d6e4316..268aaad3bb08 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -1173,16 +1173,15 @@  static int intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl,
 	for (gpp = 0; gpp < community->ngpps; gpp++) {
 		const struct intel_padgroup *padgrp = &community->gpps[gpp];
 		unsigned long pending, enabled, gpp_offset;
-		unsigned long flags;
 
-		raw_spin_lock_irqsave(&pctrl->lock, flags);
+		raw_spin_lock(&pctrl->lock);
 
 		pending = readl(community->regs + community->is_offset +
 				padgrp->reg_num * 4);
 		enabled = readl(community->regs + community->ie_offset +
 				padgrp->reg_num * 4);
 
-		raw_spin_unlock_irqrestore(&pctrl->lock, flags);
+		raw_spin_unlock(&pctrl->lock);
 
 		/* Only interrupts that are enabled */
 		pending &= enabled;