diff mbox

[U-Boot,v6,07/15] dm: Use case-insensitive comparison for GPIO banks

Message ID 1402550995-15963-8-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass June 12, 2014, 5:29 a.m. UTC
We want 'N0' and 'n0' to mean the same thing, so ensure that case is not
considered when naming GPIO banks.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Add new patch to use case-insensitive comparison for GPIO banks

 drivers/gpio/gpio-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass June 20, 2014, 8:31 p.m. UTC | #1
On 11 June 2014 23:29, Simon Glass <sjg@chromium.org> wrote:
> We want 'N0' and 'n0' to mean the same thing, so ensure that case is not
> considered when naming GPIO banks.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm/master.
diff mbox

Patch

diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index fa2c2fb..f1bbc58 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -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)