Commit 596a1c5f authored by Linus Walleij's avatar Linus Walleij

gpio: mcp23s08: switch chip count to int

Commit 3e3bed91
"gpio: mcp23s08: fixed count variable for devicetree probing"
introduced a loop check to see if the number of chips were
unconsistent and going below zero counting downwards, but
this requires the counting variable to be able to be
negative, so switch the variable from unsigned to int.

Cc: Michael Stickel <ms@mycable.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 6a2f4b7d
......@@ -867,7 +867,7 @@ static int mcp23s08_probe(struct spi_device *spi)
{
struct mcp23s08_platform_data *pdata;
unsigned addr;
unsigned chips = 0;
int chips = 0;
struct mcp23s08_driver_data *data;
int status, type;
unsigned base = -1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment