Skip to content

Commit

Permalink
gpio: of: Fix logic inversion
Browse files Browse the repository at this point in the history
The SPI chip selects were not properly inspected due to
a logic inversion. This made SPI GPIOs not work.

Cc: Jan Kotas <jank@cadence.com>
Reported-by: Jan Kotas <jank@cadence.com>
Tested-by: Jan Kotas <jank@cadence.com>
Fixes: f3186dd ("spi: Optionally use GPIO descriptors for CS GPIOs")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Linus Walleij authored and Mark Brown committed Jan 24, 2019
1 parent 6046f54 commit c1c04ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpiolib-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static void of_gpio_flags_quirks(struct device_node *np,

for_each_child_of_node(np, child) {
ret = of_property_read_u32(child, "reg", &cs);
if (!ret)
if (ret)
continue;
if (cs == index) {
/*
Expand Down

0 comments on commit c1c04ce

Please sign in to comment.