diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-06-10 20:10:47 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-06-12 11:13:20 +0200 |
commit | 395373c721a2dc22daf09c902effab5fc0bb5ae5 (patch) | |
tree | cdb87247a854f8b23bacf1416b4a6e0f802313d2 /README | |
parent | c030a9c96b8e429405f103113f26f330fb58417e (diff) | |
download | linux-395373c721a2dc22daf09c902effab5fc0bb5ae5.tar.bz2 |
gpio: omap: clean up edge interrupt handling
The edge interrupt handling was effectively:
isr = ISR_reg & enabled;
if (bank->level_mask)
level_mask = bank->level_mask & enabled;
else
level_mask = 0;
edge = isr & ~level_mask;
When bank->level_mask is zero, level_mask will be computed as zero
anyway, so the if() statement is redundant. We are then left with:
isr = ISR_reg & enabled;
level_mask = bank->level_mask & enabled;
edge = isr & ~level_mask;
This can be simplified further to:
isr = ISR_reg & enabled;
edge = isr & ~bank->level_mask;
since the second mask with 'enabled' is redundant.
Improve the associated comment as well.
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>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions