aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/of_platform.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_platform.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_platform.c')
-rw-r--r--arch/powerpc/kernel/of_platform.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 6c1dfc3ff8bc..1c747c474415 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -195,7 +195,7 @@ EXPORT_SYMBOL(of_platform_bus_probe);
195 195
196static int of_dev_node_match(struct device *dev, void *data) 196static int of_dev_node_match(struct device *dev, void *data)
197{ 197{
198 return to_of_device(dev)->node == data; 198 return to_of_device(dev)->dev.of_node == data;
199} 199}
200 200
201struct of_device *of_find_device_by_node(struct device_node *np) 201struct of_device *of_find_device_by_node(struct device_node *np)
@@ -213,7 +213,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
213static int of_dev_phandle_match(struct device *dev, void *data) 213static int of_dev_phandle_match(struct device *dev, void *data)
214{ 214{
215 phandle *ph = data; 215 phandle *ph = data;
216 return to_of_device(dev)->node->phandle == *ph; 216 return to_of_device(dev)->dev.of_node->phandle == *ph;
217} 217}
218 218
219struct of_device *of_find_device_by_phandle(phandle ph) 219struct of_device *of_find_device_by_phandle(phandle ph)
@@ -246,10 +246,10 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
246 if (ppc_md.pci_setup_phb == NULL) 246 if (ppc_md.pci_setup_phb == NULL)
247 return -ENODEV; 247 return -ENODEV;
248 248
249 printk(KERN_INFO "Setting up PCI bus %s\n", dev->node->full_name); 249 pr_info("Setting up PCI bus %s\n", dev->dev.of_node->full_name);
250 250
251 /* Alloc and setup PHB data structure */ 251 /* Alloc and setup PHB data structure */
252 phb = pcibios_alloc_controller(dev->node); 252 phb = pcibios_alloc_controller(dev->dev.of_node);
253 if (!phb) 253 if (!phb)
254 return -ENODEV; 254 return -ENODEV;
255 255
@@ -263,19 +263,19 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
263 } 263 }
264 264
265 /* Process "ranges" property */ 265 /* Process "ranges" property */
266 pci_process_bridge_OF_ranges(phb, dev->node, 0); 266 pci_process_bridge_OF_ranges(phb, dev->dev.of_node, 0);
267 267
268 /* Init pci_dn data structures */ 268 /* Init pci_dn data structures */
269 pci_devs_phb_init_dynamic(phb); 269 pci_devs_phb_init_dynamic(phb);
270 270
271 /* Register devices with EEH */ 271 /* Register devices with EEH */
272#ifdef CONFIG_EEH 272#ifdef CONFIG_EEH
273 if (dev->node->child) 273 if (dev->dev.of_node->child)
274 eeh_add_device_tree_early(dev->node); 274 eeh_add_device_tree_early(dev->dev.of_node);
275#endif /* CONFIG_EEH */ 275#endif /* CONFIG_EEH */
276 276
277 /* Scan the bus */ 277 /* Scan the bus */
278 pcibios_scan_phb(phb, dev->node); 278 pcibios_scan_phb(phb, dev->dev.of_node);
279 if (phb->bus == NULL) 279 if (phb->bus == NULL)
280 return -ENXIO; 280 return -ENXIO;
281 281