summaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorJulian Calaby <julian.calaby@gmail.com>2009-01-05 09:07:18 +0100
committerDavid S. Miller <davem@davemloft.net>2009-01-05 09:07:18 +0100
commit47cd5265ea8fe0b246bfd9b42ba69e13aa8b99bd (patch)
tree3c413ded05253219d50b6ce9871e19d3bf2a259f /arch/sparc
parentsparc: Kill asm/reg*.h (diff)
downloadlinux-47cd5265ea8fe0b246bfd9b42ba69e13aa8b99bd.tar.xz
linux-47cd5265ea8fe0b246bfd9b42ba69e13aa8b99bd.zip
sparc: Clean arch-specific code in prom_common.c
prom_nextprop() and prom_firstprop() have slightly different calling conventions in 32 and 64 bit SPARC. prom_common.c uses a ifdef guard to ensure that these functions are called correctly. Adjust code to eliminate this ifdef by using a calling convention that is compatible with both 32 and 64 bit SPARC. Signed-off-by: Julian Calaby <julian.calaby@gmail.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/prom_common.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c
index 4e9af593db49..ff7b591c8946 100644
--- a/arch/sparc/kernel/prom_common.c
+++ b/arch/sparc/kernel/prom_common.c
@@ -155,20 +155,12 @@ static struct property * __init build_one_prop(phandle node, char *prev,
p->value = prom_early_alloc(special_len);
memcpy(p->value, special_val, special_len);
} else {
-#ifdef CONFIG_SPARC32
- if (prev == NULL) {
- name = prom_firstprop(node, NULL);
- } else {
- name = prom_nextprop(node, prev, NULL);
- }
-#else
if (prev == NULL) {
- prom_firstprop(node, p->name);
+ name = prom_firstprop(node, p->name);
} else {
- prom_nextprop(node, prev, p->name);
+ name = prom_nextprop(node, prev, p->name);
}
- name = p->name;
-#endif
+
if (strlen(name) == 0) {
tmp = p;
return NULL;