diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-01-13 19:13:49 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-13 21:19:18 -0500 |
commit | 575e321606c5673efabf28c0fa075e198980c44e (patch) | |
tree | 0d9f9c1a78946aca34af74f701dc3f7cf251e47a /arch/powerpc/platforms/chrp/setup.c | |
parent | 91dc182ca6e25ee8b648ed2fb2a41859ead34903 (diff) |
[PATCH] powerpc: Make CHRP build again
This makes CHRP build again, although it's untested because my Pegasos
is currently in pieces.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/chrp/setup.c')
-rw-r--r-- | arch/powerpc/platforms/chrp/setup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 4ec8ba737e7d..2dc87aa5962f 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -352,9 +352,10 @@ static void __init chrp_find_openpic(void) | |||
352 | opaddr = opprop[na-1]; /* assume 32-bit */ | 352 | opaddr = opprop[na-1]; /* assume 32-bit */ |
353 | oplen /= na * sizeof(unsigned int); | 353 | oplen /= na * sizeof(unsigned int); |
354 | } else { | 354 | } else { |
355 | if (np->n_addrs == 0) | 355 | struct resource r; |
356 | if (of_address_to_resource(np, 0, &r)) | ||
356 | return; | 357 | return; |
357 | opaddr = np->addrs[0].address; | 358 | opaddr = r.start; |
358 | oplen = 0; | 359 | oplen = 0; |
359 | } | 360 | } |
360 | 361 | ||
@@ -377,7 +378,7 @@ static void __init chrp_find_openpic(void) | |||
377 | */ | 378 | */ |
378 | if (oplen < len) { | 379 | if (oplen < len) { |
379 | printk(KERN_ERR "Insufficient addresses for distributed" | 380 | printk(KERN_ERR "Insufficient addresses for distributed" |
380 | " OpenPIC (%d < %d)\n", np->n_addrs, len); | 381 | " OpenPIC (%d < %d)\n", oplen, len); |
381 | len = oplen; | 382 | len = oplen; |
382 | } | 383 | } |
383 | 384 | ||