Skip to content

Commit

Permalink
gpio: Fix gpio direction flags not getting set
Browse files Browse the repository at this point in the history
GPIO direction flags are not getting set because
an 'if' statement is the wrong way around.

Cc: Stable <stable@vger.kernel.org> # 3.15+
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Adrian Hunter authored and Linus Walleij committed Sep 24, 2014
1 parent 0f33be0 commit 72f908c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ struct gpio_desc *__must_check __gpiod_get_index(struct device *dev,
set_bit(FLAG_OPEN_SOURCE, &desc->flags);

/* No particular flag request, return here... */
if (flags & GPIOD_FLAGS_BIT_DIR_SET)
if (!(flags & GPIOD_FLAGS_BIT_DIR_SET))
return desc;

/* Process flags */
Expand Down

0 comments on commit 72f908c

Please sign in to comment.