of: Always use 'struct device.of_node' to get device node pointer.
[safe/jmp/linux-2.6] / arch / sparc / kernel / pci.c
index 0c92014..c7a214e 100644 (file)
@@ -654,7 +654,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char *
        struct device_node *dp;
 
        pdev = to_pci_dev(dev);
-       dp = pdev->dev.archdata.prom_node;
+       dp = pdev->dev.of_node;
 
        return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name);
 }
@@ -684,7 +684,7 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
 struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
                                            struct device *parent)
 {
-       struct device_node *node = pbm->op->node;
+       struct device_node *node = pbm->op->dev.of_node;
        struct pci_bus *bus;
 
        printk("PCI: Scanning PBM %s\n", node->full_name);
@@ -1023,7 +1023,7 @@ void arch_teardown_msi_irq(unsigned int virt_irq)
 
 struct device_node *pci_device_to_OF_node(struct pci_dev *pdev)
 {
-       return pdev->dev.archdata.prom_node;
+       return pdev->dev.of_node;
 }
 EXPORT_SYMBOL(pci_device_to_OF_node);
 
@@ -1152,15 +1152,13 @@ static int __init of_pci_slot_init(void)
                struct device_node *node;
 
                if (pbus->self) {
-                       struct dev_archdata *sd = pbus->self->sysdata;
-
                        /* PCI->PCI bridge */
-                       node = sd->prom_node;
+                       node = pbus->self->dev.of_node;
                } else {
                        struct pci_pbm_info *pbm = pbus->sysdata;
 
                        /* Host PCI controller */
-                       node = pbm->op->node;
+                       node = pbm->op->dev.of_node;
                }
 
                pci_bus_slot_names(node, pbus);