diff options
Diffstat (limited to 'arch/powerpc/kernel/of_platform.c')
-rw-r--r-- | arch/powerpc/kernel/of_platform.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 6c1dfc3ff8bc..487a98851ba6 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -74,7 +74,7 @@ struct of_device* of_platform_device_create(struct device_node *np, | |||
74 | if (!dev) | 74 | if (!dev) |
75 | return NULL; | 75 | return NULL; |
76 | 76 | ||
77 | dev->dma_mask = 0xffffffffUL; | 77 | dev->archdata.dma_mask = 0xffffffffUL; |
78 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | 78 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); |
79 | 79 | ||
80 | dev->dev.bus = &of_platform_bus_type; | 80 | dev->dev.bus = &of_platform_bus_type; |
@@ -195,7 +195,7 @@ EXPORT_SYMBOL(of_platform_bus_probe); | |||
195 | 195 | ||
196 | static int of_dev_node_match(struct device *dev, void *data) | 196 | static 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 | ||
201 | struct of_device *of_find_device_by_node(struct device_node *np) | 201 | struct of_device *of_find_device_by_node(struct device_node *np) |
@@ -213,7 +213,7 @@ EXPORT_SYMBOL(of_find_device_by_node); | |||
213 | static int of_dev_phandle_match(struct device *dev, void *data) | 213 | static 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 | ||
219 | struct of_device *of_find_device_by_phandle(phandle ph) | 219 | struct 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 | ||
@@ -306,10 +306,11 @@ static struct of_device_id of_pci_phb_ids[] = { | |||
306 | }; | 306 | }; |
307 | 307 | ||
308 | static struct of_platform_driver of_pci_phb_driver = { | 308 | static struct of_platform_driver of_pci_phb_driver = { |
309 | .match_table = of_pci_phb_ids, | ||
310 | .probe = of_pci_phb_probe, | 309 | .probe = of_pci_phb_probe, |
311 | .driver = { | 310 | .driver = { |
312 | .name = "of-pci", | 311 | .name = "of-pci", |
312 | .owner = THIS_MODULE, | ||
313 | .of_match_table = of_pci_phb_ids, | ||
313 | }, | 314 | }, |
314 | }; | 315 | }; |
315 | 316 | ||