]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: xilinx: Fix bug where the wrong GPIO register is written to
authorPaul Thomas <pthomas8589@gmail.com>
Sat, 25 Jan 2020 22:14:10 +0000 (17:14 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 10 Feb 2020 11:52:34 +0000 (12:52 +0100)
commitce6e12d7828a783716c53662cf701518bb3c2104
tree82078e0024fdb609830262f00c7763cb53819c99
parenta9c24b280fe961410d1e5efb036de17ad94f6524
gpio: xilinx: Fix bug where the wrong GPIO register is written to

Care is taken with "index", however with the current version
the actual xgpio_writereg is using index for data but
xgpio_regoffset(chip, i) for the offset. And since i is already
incremented it is incorrect. This patch fixes it so that index
is used for the offset too.

Cc: stable@vger.kernel.org
Signed-off-by: Paul Thomas <pthomas8589@gmail.com>
Link: https://lore.kernel.org/r/20200125221410.8022-1-pthomas8589@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-xilinx.c