aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/of_device.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-04-13 19:12:29 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-18 18:10:44 -0400
commit61c7a080a5a061c976988fd4b844dfb468dda255 (patch)
tree8cb492b73f2755c38a6164d770da34d5af6486a0 /arch/powerpc/kernel/of_device.c
parentd12d42f744f805a9ccc33cd76f04b237cd83ce56 (diff)
of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/kernel/of_device.c')
-rw-r--r--arch/powerpc/kernel/of_device.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 9577e6f4e3bf..285c8490c547 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -13,7 +13,7 @@
13static void of_device_make_bus_id(struct of_device *dev) 13static void of_device_make_bus_id(struct of_device *dev)
14{ 14{
15 static atomic_t bus_no_reg_magic; 15 static atomic_t bus_no_reg_magic;
16 struct device_node *node = dev->node; 16 struct device_node *node = dev->dev.of_node;
17 const u32 *reg; 17 const u32 *reg;
18 u64 addr; 18 u64 addr;
19 int magic; 19 int magic;
@@ -96,17 +96,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
96 96
97 ofdev = to_of_device(dev); 97 ofdev = to_of_device(dev);
98 98
99 if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name)) 99 if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name))
100 return -ENOMEM; 100 return -ENOMEM;
101 101
102 if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type)) 102 if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type))
103 return -ENOMEM; 103 return -ENOMEM;
104 104
105 /* Since the compatible field can contain pretty much anything 105 /* Since the compatible field can contain pretty much anything
106 * it's not really legal to split it out with commas. We split it 106 * it's not really legal to split it out with commas. We split it
107 * up using a number of environment variables instead. */ 107 * up using a number of environment variables instead. */
108 108
109 compat = of_get_property(ofdev->node, "compatible", &cplen); 109 compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen);
110 while (compat && *compat && cplen > 0) { 110 while (compat && *compat && cplen > 0) {
111 if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat)) 111 if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat))
112 return -ENOMEM; 112 return -ENOMEM;