diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-16 00:07:18 (GMT) |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-16 00:07:18 (GMT) |
commit | 97ae2b5c17d6cc988c6d49ae0cf95befb6b7081c (patch) | |
tree | a71115af6c30fdc9de0878e2cf1c51e95b17a324 /drivers/gpio/gpiolib-of.c | |
parent | ef47fa5280819deaa8da7e0db1d875b225de5838 (diff) | |
parent | c8af781ebf3ffe37c18c34ca89e29c085560e561 (diff) | |
download | linux-97ae2b5c17d6cc988c6d49ae0cf95befb6b7081c.tar.xz |
Merge branch 'bfin_rotary' into next
Merge bfin_rotary driver changes from Sonic Zhang.
Diffstat (limited to 'drivers/gpio/gpiolib-of.c')
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 604dbe6..08261f2 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -45,8 +45,14 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data) return false; ret = gc->of_xlate(gc, &gg_data->gpiospec, gg_data->flags); - if (ret < 0) - return false; + if (ret < 0) { + /* We've found the gpio chip, but the translation failed. + * Return true to stop looking and return the translation + * error via out_gpio + */ + gg_data->out_gpio = ERR_PTR(ret); + return true; + } gg_data->out_gpio = gpiochip_get_desc(gc, ret); return true; |