summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2019-02-16 20:24:43 -0700
committerBin Meng <[email protected]>2019-02-20 15:25:28 +0800
commit48ca690917fc98cffa6b991a6e37fb221a64c9c8 (patch)
tree54e51d8e7d0a89dd189b18810289f8a8c77ce9ef /cmd
parentb8989b537eb1f3387d08a1c34633e78e6a56acc2 (diff)
gpio: Use case-insentive matching on the GPIO name
Allow the 'gpio' command to match GPIO bank names regardless of the case of each. While these are generally in upper case, it is useful to be able to provide lower case with the command. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/gpio.c b/cmd/gpio.c
index 539e07ee077..53366f36e76 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -90,7 +90,7 @@ static int do_gpio_status(bool all, const char *gpio_name)
banklen = bank_name ? strlen(bank_name) : 0;
if (!gpio_name || !bank_name ||
- !strncmp(gpio_name, bank_name, banklen)) {
+ !strncasecmp(gpio_name, bank_name, banklen)) {
const char *p = NULL;
int offset;