diff options
| author | Mark Brown <broonie@kernel.org> | 2016-07-29 21:38:37 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2016-07-29 21:38:37 +0100 |
| commit | da9a92f0cde9ce34a930d7edcaef30429e41d14a (patch) | |
| tree | 44095fbc8f83990330437d11c7a9fc699a5e2521 /drivers/gpio/gpiolib-legacy.c | |
| parent | aa6b4960f4571ecc422a13b2490e91f5debb64a1 (diff) | |
| parent | b0ba6b0a5eb2b51037a07dbf5a7470ca804d575c (diff) | |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'drivers/gpio/gpiolib-legacy.c')
| -rw-r--r-- | drivers/gpio/gpiolib-legacy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib-legacy.c b/drivers/gpio/gpiolib-legacy.c index 3a5c7011ad3b..8b830996fe02 100644 --- a/drivers/gpio/gpiolib-legacy.c +++ b/drivers/gpio/gpiolib-legacy.c @@ -28,6 +28,10 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) if (!desc && gpio_is_valid(gpio)) return -EPROBE_DEFER; + err = gpiod_request(desc, label); + if (err) + return err; + if (flags & GPIOF_OPEN_DRAIN) set_bit(FLAG_OPEN_DRAIN, &desc->flags); @@ -37,10 +41,6 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) if (flags & GPIOF_ACTIVE_LOW) set_bit(FLAG_ACTIVE_LOW, &desc->flags); - err = gpiod_request(desc, label); - if (err) - return err; - if (flags & GPIOF_DIR_IN) err = gpiod_direction_input(desc); else |
