]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: omap: simplify omap_toggle_gpio_edge_triggering()
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 10 Jun 2019 17:10:56 +0000 (20:10 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 12 Jun 2019 09:14:30 +0000 (11:14 +0200)
commitc8a64586f9a3e0dd2970f11eaa16cec87d1ea081
treeab13f7de854c3c4376d8bd89512a09a673d1366f
parentd33f945441a487ff87a965182ababa3290c7f3fa
gpio: omap: simplify omap_toggle_gpio_edge_triggering()

This function open-codes an exclusive-or bitwise operation using an
if() statement and explicitly setting or clearing the bit. Instead,
use an exclusive-or operation instead, and simplify the function.

We can combine the preprocessor conditional using IS_ENABLED() and
gain some additional compilation coverage.

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