drivers/pinctrl.c : Remove redundant clearing of IRQ_TYPE_SENSE_MASK

Message ID 20230519170716.3459-1-sensor1010@163.com
State New
Headers
Series drivers/pinctrl.c : Remove redundant clearing of IRQ_TYPE_SENSE_MASK |

Commit Message

Lizhe May 19, 2023, 5:07 p.m. UTC
  Before executing microchip_sgpio_irq_set_type(),
type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger().

Signed-off-by: Lizhe <sensor1010@163.com>
---
 drivers/pinctrl/pinctrl-microchip-sgpio.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Linus Walleij May 29, 2023, 1:08 p.m. UTC | #1
On Fri, May 19, 2023 at 7:08 PM Lizhe <sensor1010@163.com> wrote:

> Before executing microchip_sgpio_irq_set_type(),
> type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger().
>
> Signed-off-by: Lizhe <sensor1010@163.com>

Looks correct to me so patch applied.

Yours,
Linus Walleij
  

Patch

diff --git a/drivers/pinctrl/pinctrl-microchip-sgpio.c b/drivers/pinctrl/pinctrl-microchip-sgpio.c
index 4794602316e7..59f232a68b5a 100644
--- a/drivers/pinctrl/pinctrl-microchip-sgpio.c
+++ b/drivers/pinctrl/pinctrl-microchip-sgpio.c
@@ -719,8 +719,6 @@  static void microchip_sgpio_irq_ack(struct irq_data *data)
 
 static int microchip_sgpio_irq_set_type(struct irq_data *data, unsigned int type)
 {
-	type &= IRQ_TYPE_SENSE_MASK;
-
 	switch (type) {
 	case IRQ_TYPE_EDGE_BOTH:
 		irq_set_handler_locked(data, handle_edge_irq);