aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/of_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/of_device.c')
-rw-r--r--arch/sparc/kernel/of_device.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index dab6169e31ca..798b140fabeb 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -495,7 +495,7 @@ static void __init build_device_resources(struct of_device *op,
495 u32 *reg = (preg + (index * ((na + ns) * 4))); 495 u32 *reg = (preg + (index * ((na + ns) * 4)));
496 struct device_node *dp = op->node; 496 struct device_node *dp = op->node;
497 struct device_node *pp = p_op->node; 497 struct device_node *pp = p_op->node;
498 struct of_bus *pbus; 498 struct of_bus *pbus, *dbus;
499 u64 size, result = OF_BAD_ADDR; 499 u64 size, result = OF_BAD_ADDR;
500 unsigned long flags; 500 unsigned long flags;
501 int dna, dns; 501 int dna, dns;
@@ -516,6 +516,7 @@ static void __init build_device_resources(struct of_device *op,
516 516
517 dna = na; 517 dna = na;
518 dns = ns; 518 dns = ns;
519 dbus = bus;
519 520
520 while (1) { 521 while (1) {
521 dp = pp; 522 dp = pp;
@@ -528,13 +529,13 @@ static void __init build_device_resources(struct of_device *op,
528 pbus = of_match_bus(pp); 529 pbus = of_match_bus(pp);
529 pbus->count_cells(dp, &pna, &pns); 530 pbus->count_cells(dp, &pna, &pns);
530 531
531 if (build_one_resource(dp, bus, pbus, addr, 532 if (build_one_resource(dp, dbus, pbus, addr,
532 dna, dns, pna)) 533 dna, dns, pna))
533 break; 534 break;
534 535
535 dna = pna; 536 dna = pna;
536 dns = pns; 537 dns = pns;
537 bus = pbus; 538 dbus = pbus;
538 } 539 }
539 540
540 build_res: 541 build_res: