Lines Matching refs:dev
72 struct of_device *dev; in of_platform_device_create() local
74 dev = of_device_alloc(np, bus_id, parent); in of_platform_device_create()
75 if (!dev) in of_platform_device_create()
78 dev->dma_mask = 0xffffffffUL; in of_platform_device_create()
79 dev->dev.coherent_dma_mask = DMA_32BIT_MASK; in of_platform_device_create()
81 dev->dev.bus = &of_platform_bus_type; in of_platform_device_create()
88 if (of_device_register(dev) != 0) { in of_platform_device_create()
89 of_device_free(dev); in of_platform_device_create()
93 return dev; in of_platform_device_create()
111 struct of_device *dev; in of_platform_bus_create() local
116 dev = of_platform_device_create(child, NULL, parent); in of_platform_bus_create()
117 if (dev == NULL) in of_platform_bus_create()
123 rc = of_platform_bus_create(child, matches, &dev->dev); in of_platform_bus_create()
147 struct of_device *dev; in of_platform_bus_probe() local
167 dev = of_platform_device_create(root, NULL, parent); in of_platform_bus_probe()
168 if (dev == NULL) { in of_platform_bus_probe()
173 rc = of_platform_bus_create(root, matches, &dev->dev); in of_platform_bus_probe()
181 dev = of_platform_device_create(child, NULL, parent); in of_platform_bus_probe()
182 if (dev == NULL) in of_platform_bus_probe()
185 rc = of_platform_bus_create(child, matches, &dev->dev); in of_platform_bus_probe()
197 static int of_dev_node_match(struct device *dev, void *data) in of_dev_node_match() argument
199 return to_of_device(dev)->node == data; in of_dev_node_match()
204 struct device *dev; in of_find_device_by_node() local
206 dev = bus_find_device(&of_platform_bus_type, in of_find_device_by_node()
208 if (dev) in of_find_device_by_node()
209 return to_of_device(dev); in of_find_device_by_node()
214 static int of_dev_phandle_match(struct device *dev, void *data) in of_dev_phandle_match() argument
217 return to_of_device(dev)->node->linux_phandle == *ph; in of_dev_phandle_match()
222 struct device *dev; in of_find_device_by_phandle() local
224 dev = bus_find_device(&of_platform_bus_type, in of_find_device_by_phandle()
226 if (dev) in of_find_device_by_phandle()
227 return to_of_device(dev); in of_find_device_by_phandle()
241 static int __devinit of_pci_phb_probe(struct of_device *dev, in of_pci_phb_probe() argument
250 printk(KERN_INFO "Setting up PCI bus %s\n", dev->node->full_name); in of_pci_phb_probe()
253 phb = pcibios_alloc_controller(dev->node); in of_pci_phb_probe()
258 phb->parent = &dev->dev; in of_pci_phb_probe()
267 pci_process_bridge_OF_ranges(phb, dev->node, 0); in of_pci_phb_probe()
274 if (dev->node->child) in of_pci_phb_probe()
275 eeh_add_device_tree_early(dev->node); in of_pci_phb_probe()