gpio: Fix gpio direction flags not getting set
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>
This commit is contained in:
committed by
Linus Walleij
parent
0f33be009b
commit
72f908c88c
@@ -1674,7 +1674,7 @@ struct gpio_desc *__must_check __gpiod_get_index(struct device *dev,
|
|||||||
set_bit(FLAG_OPEN_SOURCE, &desc->flags);
|
set_bit(FLAG_OPEN_SOURCE, &desc->flags);
|
||||||
|
|
||||||
/* No particular flag request, return here... */
|
/* No particular flag request, return here... */
|
||||||
if (flags & GPIOD_FLAGS_BIT_DIR_SET)
|
if (!(flags & GPIOD_FLAGS_BIT_DIR_SET))
|
||||||
return desc;
|
return desc;
|
||||||
|
|
||||||
/* Process flags */
|
/* Process flags */
|
||||||
|
Reference in New Issue
Block a user