[SPARC]: Make sure dev_archdata is filled in for all devices.
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -148,6 +148,7 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
|
||||
{
|
||||
const struct linux_prom_registers *regs;
|
||||
struct linux_ebus_child *child;
|
||||
struct dev_archdata *sd;
|
||||
const int *irqs;
|
||||
int i, n, len;
|
||||
unsigned long baseaddr;
|
||||
@@ -234,6 +235,10 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
|
||||
}
|
||||
}
|
||||
|
||||
sd = &dev->ofdev.dev.archdata;
|
||||
sd->prom_node = dp;
|
||||
sd->op = &dev->ofdev;
|
||||
|
||||
dev->ofdev.node = dp;
|
||||
dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
|
||||
dev->ofdev.dev.bus = &ebus_bus_type;
|
||||
|
@@ -420,11 +420,16 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
|
||||
{
|
||||
struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL);
|
||||
const struct linux_prom_irqs *intr;
|
||||
struct dev_archdata *sd;
|
||||
int len, i;
|
||||
|
||||
if (!op)
|
||||
return NULL;
|
||||
|
||||
sd = &op->dev.archdata;
|
||||
sd->prom_node = dp;
|
||||
sd->op = op;
|
||||
|
||||
op->node = dp;
|
||||
|
||||
op->clock_freq = of_getintprop_default(dp, "clock-frequency",
|
||||
|
Reference in New Issue
Block a user