[SPARC]: Use strcasecmp for OFW property name comparisons.
authorDavid S. Miller <davem@sunset.davemloft.net>
Thu, 29 Mar 2007 08:28:51 +0000 (01:28 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 08:54:41 +0000 (01:54 -0700)
This allows us to simplify sharing code with powerpc which
has properties that have various forms of capitalization
when on the sparc64 side the property is all lower-case.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/prom.c
arch/sparc64/kernel/prom.c

index 9ddf6035915ca534e2279622ed089fb0160126a5..eed140b3c7397caf4abe0bd204df9bbb45dd25df 100644 (file)
@@ -158,7 +158,7 @@ struct property *of_find_property(const struct device_node *np,
        struct property *pp;
 
        for (pp = np->properties; pp != 0; pp = pp->next) {
-               if (strcmp(pp->name, name) == 0) {
+               if (strcasecmp(pp->name, name) == 0) {
                        if (lenp != 0)
                                *lenp = pp->length;
                        break;
@@ -242,7 +242,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
        while (*prevp) {
                struct property *prop = *prevp;
 
-               if (!strcmp(prop->name, name)) {
+               if (!strcasecmp(prop->name, name)) {
                        void *old_val = prop->value;
                        int ret;
 
index 493db961a1f655aa19a5891e27077818c39caf45..13734b50a6e85974eefc3e0c3bc229ae1c584189 100644 (file)
@@ -160,7 +160,7 @@ struct property *of_find_property(struct device_node *np, const char *name,
        struct property *pp;
 
        for (pp = np->properties; pp != 0; pp = pp->next) {
-               if (strcmp(pp->name, name) == 0) {
+               if (strcasecmp(pp->name, name) == 0) {
                        if (lenp != 0)
                                *lenp = pp->length;
                        break;
@@ -243,7 +243,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
        while (*prevp) {
                struct property *prop = *prevp;
 
-               if (!strcmp(prop->name, name)) {
+               if (!strcasecmp(prop->name, name)) {
                        void *old_val = prop->value;
                        int ret;