]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
gpio: Fix wrong rounding in gpio-menz127
authorNadav Amit <namit@vmware.com>
Mon, 4 Jun 2018 13:58:14 +0000 (06:58 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 18 Jun 2018 05:55:30 +0000 (07:55 +0200)
commit7279d9917560bbd0d82813d6bf00490a82c06783
tree2b09b42b48cc36d169fcde66720240478c559d54
parentce397d215ccd07b8ae3f71db689aedb85d56ab40
gpio: Fix wrong rounding in gpio-menz127

men_z127_debounce() tries to round up and down, but uses functions which
are only suitable when the divider is a power of two, which is not the
case. Use the appropriate ones.

Found by static check. Compile tested.

Fixes: f436bc2726c64 ("gpio: add driver for MEN 16Z127 GPIO controller")
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-menz127.c