aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/ebus.c5
-rw-r--r--arch/sparc/kernel/of_device.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c
index 7bb86b9cdaa3..ac352eb6dff3 100644
--- a/arch/sparc/kernel/ebus.c
+++ b/arch/sparc/kernel/ebus.c
@@ -148,6 +148,7 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
148{ 148{
149 const struct linux_prom_registers *regs; 149 const struct linux_prom_registers *regs;
150 struct linux_ebus_child *child; 150 struct linux_ebus_child *child;
151 struct dev_archdata *sd;
151 const int *irqs; 152 const int *irqs;
152 int i, n, len; 153 int i, n, len;
153 unsigned long baseaddr; 154 unsigned long baseaddr;
@@ -234,6 +235,10 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
234 } 235 }
235 } 236 }
236 237
238 sd = &dev->ofdev.dev.archdata;
239 sd->prom_node = dp;
240 sd->op = &dev->ofdev;
241
237 dev->ofdev.node = dp; 242 dev->ofdev.node = dp;
238 dev->ofdev.dev.parent = &dev->bus->ofdev.dev; 243 dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
239 dev->ofdev.dev.bus = &ebus_bus_type; 244 dev->ofdev.dev.bus = &ebus_bus_type;
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index 7176040caba0..36383f73d685 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -420,11 +420,16 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
420{ 420{
421 struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL); 421 struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL);
422 const struct linux_prom_irqs *intr; 422 const struct linux_prom_irqs *intr;
423 struct dev_archdata *sd;
423 int len, i; 424 int len, i;
424 425
425 if (!op) 426 if (!op)
426 return NULL; 427 return NULL;
427 428
429 sd = &op->dev.archdata;
430 sd->prom_node = dp;
431 sd->op = op;
432
428 op->node = dp; 433 op->node = dp;
429 434
430 op->clock_freq = of_getintprop_default(dp, "clock-frequency", 435 op->clock_freq = of_getintprop_default(dp, "clock-frequency",