aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r--arch/powerpc/kernel/prom.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index bf2005b2feb6..eb913f80bfb1 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -757,24 +757,9 @@ static int __init early_init_dt_scan_root(unsigned long node,
757static unsigned long __init dt_mem_next_cell(int s, cell_t **cellp) 757static unsigned long __init dt_mem_next_cell(int s, cell_t **cellp)
758{ 758{
759 cell_t *p = *cellp; 759 cell_t *p = *cellp;
760 unsigned long r;
761 760
762 /* Ignore more than 2 cells */ 761 *cellp = p + s;
763 while (s > sizeof(unsigned long) / 4) { 762 return of_read_ulong(p, s);
764 p++;
765 s--;
766 }
767 r = *p++;
768#ifdef CONFIG_PPC64
769 if (s > 1) {
770 r <<= 32;
771 r |= *(p++);
772 s--;
773 }
774#endif
775
776 *cellp = p;
777 return r;
778} 763}
779 764
780 765