Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72f908c8 authored by Adrian Hunter's avatar Adrian Hunter Committed by Linus Walleij
Browse files

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: default avatarAdrian Hunter <adrian.hunter@intel.com>
Acked-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 0f33be00
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 */