diff options
author | Tarun Kanti DebBarma <tarun.kanti@ti.com> | 2011-11-25 13:57:37 +0400 |
---|---|---|
committer | Tarun Kanti DebBarma <tarun.kanti@ti.com> | 2012-03-20 13:59:09 +0400 |
commit | 8276536cec38bc6bde30d0aa67716f22b9b9705a (patch) | |
tree | d403517a6f691daa13cb6245930b3219b893094a | |
parent | 00ece7e4826e631565eae089d3c813120c6535ef (diff) | |
download | linux-8276536cec38bc6bde30d0aa67716f22b9b9705a.tar.xz |
gpio/omap: fix _set_gpio_irqenable implementation
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>
-rw-r--r-- | drivers/gpio/gpio-omap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 2042857a3663..8901d576cb7d 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -484,7 +484,10 @@ static void _disable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask) static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int enable) { - _enable_gpio_irqbank(bank, GPIO_BIT(bank, gpio)); + if (enable) + _enable_gpio_irqbank(bank, GPIO_BIT(bank, gpio)); + else + _disable_gpio_irqbank(bank, GPIO_BIT(bank, gpio)); } /* |