sparc: Commonize get_one_property() implementations.
authorDavid S. Miller <davem@davemloft.net>
Sat, 6 Dec 2008 01:06:47 +0000 (17:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Dec 2008 01:06:47 +0000 (17:06 -0800)
Add final len assignment in sparc64's get_one_property() (it's necessary
to avoid unchecked return value warnings on the sparc32 side),
and mark name argument const on sparc32's copy.

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

index a9859d2b256590bf26755ba29f0e94e3aa8770b7..a6809bc9ab9db882397f23e3bb64bb59d5bf1469 100644 (file)
@@ -196,7 +196,7 @@ static char * __init build_full_name(struct device_node *dp)
        return n;
 }
 
-static char * __init get_one_property(phandle node, char *name)
+static char * __init get_one_property(phandle node, const char *name)
 {
        char *buf = "<NULL>";
        int len;
index e3969db4d58bd85690ea4b03edb29d2e6b06d12f..ce96c1cf6c3a080251d215f7044043f72b69a9b7 100644 (file)
@@ -407,7 +407,7 @@ static char * __init get_one_property(phandle node, const char *name)
        len = prom_getproplen(node, name);
        if (len > 0) {
                buf = prom_early_alloc(len);
-               prom_getproperty(node, name, buf, len);
+               len = prom_getproperty(node, name, buf, len);
        }
 
        return buf;
This page took 0.308204 seconds and 5 git commands to generate.