]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2020 18:53:02 +0000 (19:53 +0100)
commit4267ba3bac6df461a50cefa5c586e598af77c479
treefb056cbfdcfdfa5f84600838129f94dd98ed0102
parent8791bb8f8471d0198b15ad9d4d00dc3cebf8fde7
gpio: xilinx: Fix bug where the wrong GPIO register is written to

commit c3afa804c58e5c30ac63858b527fffadc88bce82 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-xilinx.c