diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:12:29 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-18 18:10:44 -0400 |
commit | 61c7a080a5a061c976988fd4b844dfb468dda255 (patch) | |
tree | 8cb492b73f2755c38a6164d770da34d5af6486a0 /arch/microblaze | |
parent | d12d42f744f805a9ccc33cd76f04b237cd83ce56 (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/microblaze')
-rw-r--r-- | arch/microblaze/kernel/of_device.c | 8 | ||||
-rw-r--r-- | arch/microblaze/kernel/of_platform.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/microblaze/kernel/of_device.c b/arch/microblaze/kernel/of_device.c index f6c521898ebf..90d2246e15c0 100644 --- a/arch/microblaze/kernel/of_device.c +++ b/arch/microblaze/kernel/of_device.c | |||
@@ -12,7 +12,7 @@ | |||
12 | void of_device_make_bus_id(struct of_device *dev) | 12 | void of_device_make_bus_id(struct of_device *dev) |
13 | { | 13 | { |
14 | static atomic_t bus_no_reg_magic; | 14 | static atomic_t bus_no_reg_magic; |
15 | struct device_node *node = dev->node; | 15 | struct device_node *node = dev->dev.of_node; |
16 | const u32 *reg; | 16 | const u32 *reg; |
17 | u64 addr; | 17 | u64 addr; |
18 | int magic; | 18 | int magic; |
@@ -76,17 +76,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
76 | 76 | ||
77 | ofdev = to_of_device(dev); | 77 | ofdev = to_of_device(dev); |
78 | 78 | ||
79 | if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name)) | 79 | if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name)) |
80 | return -ENOMEM; | 80 | return -ENOMEM; |
81 | 81 | ||
82 | if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type)) | 82 | if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type)) |
83 | return -ENOMEM; | 83 | return -ENOMEM; |
84 | 84 | ||
85 | /* Since the compatible field can contain pretty much anything | 85 | /* Since the compatible field can contain pretty much anything |
86 | * it's not really legal to split it out with commas. We split it | 86 | * it's not really legal to split it out with commas. We split it |
87 | * up using a number of environment variables instead. */ | 87 | * up using a number of environment variables instead. */ |
88 | 88 | ||
89 | compat = of_get_property(ofdev->node, "compatible", &cplen); | 89 | compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen); |
90 | while (compat && *compat && cplen > 0) { | 90 | while (compat && *compat && cplen > 0) { |
91 | if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat)) | 91 | if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat)) |
92 | return -ENOMEM; | 92 | return -ENOMEM; |
diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c index 0dc755286d38..46a1e105a6bd 100644 --- a/arch/microblaze/kernel/of_platform.c +++ b/arch/microblaze/kernel/of_platform.c | |||
@@ -166,7 +166,7 @@ EXPORT_SYMBOL(of_platform_bus_probe); | |||
166 | 166 | ||
167 | static int of_dev_node_match(struct device *dev, void *data) | 167 | static int of_dev_node_match(struct device *dev, void *data) |
168 | { | 168 | { |
169 | return to_of_device(dev)->node == data; | 169 | return to_of_device(dev)->dev.of_node == data; |
170 | } | 170 | } |
171 | 171 | ||
172 | struct of_device *of_find_device_by_node(struct device_node *np) | 172 | struct of_device *of_find_device_by_node(struct device_node *np) |
@@ -184,7 +184,7 @@ EXPORT_SYMBOL(of_find_device_by_node); | |||
184 | static int of_dev_phandle_match(struct device *dev, void *data) | 184 | static int of_dev_phandle_match(struct device *dev, void *data) |
185 | { | 185 | { |
186 | phandle *ph = data; | 186 | phandle *ph = data; |
187 | return to_of_device(dev)->node->phandle == *ph; | 187 | return to_of_device(dev)->dev.of_node->phandle == *ph; |
188 | } | 188 | } |
189 | 189 | ||
190 | struct of_device *of_find_device_by_phandle(phandle ph) | 190 | struct of_device *of_find_device_by_phandle(phandle ph) |