summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-12-10 05:41:24 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-12-10 05:41:24 +0100
commitf8614d938b219d6a26b49cf3f163eda97cc33f7c (patch)
tree66968371d21cb7de989c11476f914cbc3765cebf /commands
parent8cc83c48d06d9201e1b5cbe326ff59d88fddc0d1 (diff)
parent54850184bfc3e0ba85bd2e76470549e1cfc4c72d (diff)
downloadbarebox-f8614d938b219d6a26b49cf3f163eda97cc33f7c.tar.gz
Merge branch 'for-next/gpio'
Diffstat (limited to 'commands')
-rw-r--r--commands/gpio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/gpio.c b/commands/gpio.c
index 951ad2c..6d88ab6 100644
--- a/commands/gpio.c
+++ b/commands/gpio.c
@@ -25,7 +25,9 @@ static int get_gpio_and_value(int argc, char *argv[],
if (argc < count)
return COMMAND_ERROR_USAGE;
- *gpio = gpio_find_by_label(argv[1]);
+ *gpio = gpio_find_by_name(argv[1]);
+ if (*gpio < 0)
+ *gpio = gpio_find_by_label(argv[1]);
if (*gpio < 0) {
ret = kstrtoint(argv[1], 0, gpio);
if (ret < 0)