git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
sparc
/
kernel
/
of_device.c
diff --git
a/arch/sparc/kernel/of_device.c
b/arch/sparc/kernel/of_device.c
index
74bef2a
..
798b140
100644
(file)
--- 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,
u32 *reg = (preg + (index * ((na + ns) * 4)));
struct device_node *dp = op->node;
struct device_node *pp = p_op->node;
u32 *reg = (preg + (index * ((na + ns) * 4)));
struct device_node *dp = op->node;
struct device_node *pp = p_op->node;
- struct of_bus *pbus;
+ struct of_bus *pbus
, *dbus
;
u64 size, result = OF_BAD_ADDR;
unsigned long flags;
int dna, dns;
u64 size, result = OF_BAD_ADDR;
unsigned long flags;
int dna, dns;
@@
-516,6
+516,7
@@
static void __init build_device_resources(struct of_device *op,
dna = na;
dns = ns;
dna = na;
dns = ns;
+ dbus = bus;
while (1) {
dp = pp;
while (1) {
dp = pp;
@@
-528,13
+529,13
@@
static void __init build_device_resources(struct of_device *op,
pbus = of_match_bus(pp);
pbus->count_cells(dp, &pna, &pns);
pbus = of_match_bus(pp);
pbus->count_cells(dp, &pna, &pns);
- if (build_one_resource(dp, bus, pbus, addr,
+ if (build_one_resource(dp,
d
bus, pbus, addr,
dna, dns, pna))
break;
dna = pna;
dns = pns;
dna, dns, pna))
break;
dna = pna;
dns = pns;
- bus = pbus;
+
d
bus = pbus;
}
build_res:
}
build_res:
@@
-651,7
+652,7
@@
build_resources:
if (!parent)
strcpy(op->dev.bus_id, "root");
else
if (!parent)
strcpy(op->dev.bus_id, "root");
else
- s
trcpy(op->dev.bus_id, dp->path_component_nam
e);
+ s
printf(op->dev.bus_id, "%08x", dp->nod
e);
if (of_device_register(op)) {
printk("%s: Could not register of device.\n",
if (of_device_register(op)) {
printk("%s: Could not register of device.\n",
@@
-793,10
+794,9
@@
struct of_device* of_platform_device_create(struct device_node *np,
{
struct of_device *dev;
{
struct of_device *dev;
- dev = k
m
alloc(sizeof(*dev), GFP_KERNEL);
+ dev = k
z
alloc(sizeof(*dev), GFP_KERNEL);
if (!dev)
return NULL;
if (!dev)
return NULL;
- memset(dev, 0, sizeof(*dev));
dev->dev.parent = parent;
dev->dev.bus = bus;
dev->dev.parent = parent;
dev->dev.bus = bus;