gpio: mcp23s08: Bug fix of SPI device tree registration.
authorMichael Welling <mwelling@ieee.org>
Thu, 17 Apr 2014 01:00:24 +0000 (20:00 -0500)
committerJiri Slaby <jslaby@suse.cz>
Fri, 20 Jun 2014 15:34:13 +0000 (17:34 +0200)
commitaf1cf97144be97a768b9198be6a9a5bdd2bb19ed
tree19625d172f1c572217d5e298989e0ea60668b114
parentca55f49d628c4b9805d6567b45c6cc27503ac32f
gpio: mcp23s08: Bug fix of SPI device tree registration.

commit 99e4b98dbe3ad1fe38a74d12c3b8d44a55930de4 upstream.

The chips variable needs to be incremented for each chip that is
found in the spi_present_mask when registering via device tree.
Without this and the checking a negative index is passed to the
data->chip array in a subsequent loop.

Signed-off-by: Michael Welling <mwelling@ieee.org>
Acked-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/gpio/gpio-mcp23s08.c