Commit c43d4b949b856e428d4c1f3c7d4533e40d3bbe67

Authored by Tarun Kanti DebBarma
Committed by Greg Kroah-Hartman
1 parent 712f04ff3a

gpio/omap: fix _set_gpio_irqenable implementation

commit 8276536cec38bc6bde30d0aa67716f22b9b9705a upstream.

This function should be capable of both enabling and disabling interrupts
based upon the *enable* parameter. Right now the function only enables
the interrupt and *enable* is not used at all. So add the interrupt
disable capability also using the parameter.

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff

drivers/gpio/gpio-omap.c
... ... @@ -508,7 +508,10 @@
508 508  
509 509 static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int enable)
510 510 {
511   - _enable_gpio_irqbank(bank, GPIO_BIT(bank, gpio));
  511 + if (enable)
  512 + _enable_gpio_irqbank(bank, GPIO_BIT(bank, gpio));
  513 + else
  514 + _disable_gpio_irqbank(bank, GPIO_BIT(bank, gpio));
512 515 }
513 516  
514 517 /*