Skip to content
Snippets Groups Projects
Commit 939cda5b authored by Simon Glass's avatar Simon Glass
Browse files

dm: Use case-insensitive comparison for GPIO banks


We want 'N0' and 'n0' to mean the same thing, so ensure that case is not
considered when naming GPIO banks.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 2eb31b13
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ int gpio_lookup_name(const char *name, struct udevice **devp,
uc_priv = dev->uclass_priv;
len = uc_priv->bank_name ? strlen(uc_priv->bank_name) : 0;
if (!strncmp(name, uc_priv->bank_name, len)) {
if (!strncasecmp(name, uc_priv->bank_name, len)) {
if (strict_strtoul(name + len, 10, &offset))
continue;
if (devp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment