sparc: Commonize get_one_property() implementations.
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>
This commit is contained in:
parent
b9e5567cda
commit
59966e3b4e
2 changed files with 2 additions and 2 deletions
|
@ -196,7 +196,7 @@ static char * __init build_full_name(struct device_node *dp)
|
||||||
return n;
|
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>";
|
char *buf = "<NULL>";
|
||||||
int len;
|
int len;
|
||||||
|
|
|
@ -407,7 +407,7 @@ static char * __init get_one_property(phandle node, const char *name)
|
||||||
len = prom_getproplen(node, name);
|
len = prom_getproplen(node, name);
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
buf = prom_early_alloc(len);
|
buf = prom_early_alloc(len);
|
||||||
prom_getproperty(node, name, buf, len);
|
len = prom_getproperty(node, name, buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
|
|
Loading…
Add table
Reference in a new issue