diff mbox series

[7/7] gpio/rockchip: drop irq_gc_lock/irq_gc_unlock for irq set type

Message ID 20210510063734.506063-1-jay.xu@rock-chips.com
State Superseded
Headers show
Series [1/7] pinctrl/rockchip: separate struct rockchip_pin_bank to a head file | expand

Commit Message

Jianqun Xu May 10, 2021, 6:37 a.m. UTC
There has spin lock for irq set type already, so drop irq_gc_lock and
irq_gc_unlock.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
 drivers/gpio/gpio-rockchip.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Heiko Stübner May 19, 2021, 11:26 p.m. UTC | #1
Am Montag, 10. Mai 2021, 08:37:34 CEST schrieb Jianqun Xu:
> There has spin lock for irq set type already, so drop irq_gc_lock and

> irq_gc_unlock.

> 

> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>


I've looked that up, and yes the irq_gc_lock stuff really seems to be
redundant when there is already another spinlock in place, so

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index 048e7eecddba..c9c55614bbef 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -406,7 +406,6 @@  static int rockchip_irq_set_type(struct irq_data *d, unsigned int type)
 		irq_set_handler_locked(d, handle_level_irq);
 
 	raw_spin_lock_irqsave(&bank->slock, flags);
-	irq_gc_lock(gc);
 
 	level = rockchip_gpio_readl(bank, bank->gpio_regs->int_type);
 	polarity = rockchip_gpio_readl(bank, bank->gpio_regs->int_polarity);
@@ -461,7 +460,6 @@  static int rockchip_irq_set_type(struct irq_data *d, unsigned int type)
 	rockchip_gpio_writel(bank, level, bank->gpio_regs->int_type);
 	rockchip_gpio_writel(bank, polarity, bank->gpio_regs->int_polarity);
 out:
-	irq_gc_unlock(gc);
 	raw_spin_unlock_irqrestore(&bank->slock, flags);
 
 	return ret;