powerpc: More little endian fixes for prom.c

Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Alistair Popple 2013-08-07 02:01:28 +10:00 committed by Benjamin Herrenschmidt
parent dc0e643afc
commit e91ae5bdc5

View File

@ -456,7 +456,7 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node)
if (dm == NULL || l < sizeof(__be32)) if (dm == NULL || l < sizeof(__be32))
return 0; return 0;
n = *dm++; /* number of entries */ n = of_read_number(dm++, 1); /* number of entries */
if (l < (n * (dt_root_addr_cells + 4) + 1) * sizeof(__be32)) if (l < (n * (dt_root_addr_cells + 4) + 1) * sizeof(__be32))
return 0; return 0;
@ -468,7 +468,7 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node)
for (; n != 0; --n) { for (; n != 0; --n) {
base = dt_mem_next_cell(dt_root_addr_cells, &dm); base = dt_mem_next_cell(dt_root_addr_cells, &dm);
flags = dm[3]; flags = of_read_number(&dm[3], 1);
/* skip DRC index, pad, assoc. list index, flags */ /* skip DRC index, pad, assoc. list index, flags */
dm += 4; dm += 4;
/* skip this block if the reserved bit is set in flags (0x80) /* skip this block if the reserved bit is set in flags (0x80)