diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-06-01 03:02:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-01 10:54:13 -0400 |
commit | f93ea2349832c040bdf66dc7495aa87bfe3394b8 (patch) | |
tree | 33327e4ea703df5918443df0ae27980ba5949ef6 /arch | |
parent | 44e4665cc9d856d15f04a012c78e4ab48f71290b (diff) |
[PATCH] ppc32: Apple device-tree bug fix
This is the ppc32 patch equivalent to the just posted ppc64 one working
around a bug in Apple device-trees regarding the "cpus" nodes.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc/syslib/prom_init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/ppc/syslib/prom_init.c b/arch/ppc/syslib/prom_init.c index 2cee87137f2e..7f15136830f4 100644 --- a/arch/ppc/syslib/prom_init.c +++ b/arch/ppc/syslib/prom_init.c | |||
@@ -626,8 +626,18 @@ inspect_node(phandle node, struct device_node *dad, | |||
626 | l = call_prom("package-to-path", 3, 1, node, | 626 | l = call_prom("package-to-path", 3, 1, node, |
627 | mem_start, mem_end - mem_start); | 627 | mem_start, mem_end - mem_start); |
628 | if (l >= 0) { | 628 | if (l >= 0) { |
629 | char *p, *ep; | ||
630 | |||
629 | np->full_name = PTRUNRELOC((char *) mem_start); | 631 | np->full_name = PTRUNRELOC((char *) mem_start); |
630 | *(char *)(mem_start + l) = 0; | 632 | *(char *)(mem_start + l) = 0; |
633 | /* Fixup an Apple bug where they have bogus \0 chars in the | ||
634 | * middle of the path in some properties | ||
635 | */ | ||
636 | for (p = (char *)mem_start, ep = p + l; p < ep; p++) | ||
637 | if ((*p) == '\0') { | ||
638 | memmove(p, p+1, ep - p); | ||
639 | ep--; | ||
640 | } | ||
631 | mem_start = ALIGNUL(mem_start + l + 1); | 641 | mem_start = ALIGNUL(mem_start + l + 1); |
632 | } | 642 | } |
633 | 643 | ||