diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2014-09-22 11:01:16 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-09-24 09:47:12 +0200 |
commit | 72f908c88cef42b4ad486c39967fa4d7fdffce18 (patch) | |
tree | 604c44a4c5e6766a36e552140e8d8c3535456613 /drivers/gpio/gpiolib.c | |
parent | 0f33be009b89d2268e94194dc4fd01a7851b6d51 (diff) | |
download | blackbird-op-linux-72f908c88cef42b4ad486c39967fa4d7fdffce18.tar.gz blackbird-op-linux-72f908c88cef42b4ad486c39967fa4d7fdffce18.zip |
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>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 15cc0bb65dda..3b54edf2befe 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -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 */ |