]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: omap: simplify omap_set_gpio_irqenable()
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 10 Jun 2019 17:10:57 +0000 (20:10 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 12 Jun 2019 09:14:36 +0000 (11:14 +0200)
commit860a50c09cfc471444910fc774141a631c8401b0
tree4f70b0c68c7884e6c6b0252cbe7639c498f1a937
parentc8a64586f9a3e0dd2970f11eaa16cec87d1ea081
gpio: omap: simplify omap_set_gpio_irqenable()

omap_set_gpio_irqenable() calls two helpers that are almost the same
apart from whether they set or clear bits. We can consolidate these:

- in the set/clear bit register case, we can perform the operation on
  our saved context copy and write the appropriate set/clear register.
- otherwise, we can use our read-modify-write helper and invert enable
  if irqenable_inv is set.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-omap.c