summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/pcic.c8
-rw-r--r--arch/sparc64/kernel/pci.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index 207f1b6eef53..3fa5f95c4614 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -944,6 +944,14 @@ int pcibios_assign_resource(struct pci_dev *pdev, int resource)
return -ENXIO;
}
+struct device_node *pci_device_to_OF_node(struct pci_dev *pdev)
+{
+ struct pcidev_cookie *pc = pdev->sysdata;
+
+ return pc->prom_node;
+}
+EXPORT_SYMBOL(pci_device_to_OF_node);
+
/*
* This probably belongs here rather than ioport.c because
* we do not want this crud linked into SBus kernels.
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 6fedfb98f8b0..196b4b72482b 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -681,4 +681,12 @@ void arch_teardown_msi_irq(unsigned int virt_irq)
}
#endif /* !(CONFIG_PCI_MSI) */
+struct device_node *pci_device_to_OF_node(struct pci_dev *pdev)
+{
+ struct pcidev_cookie *pc = pdev->sysdata;
+
+ return pc->op->node;
+}
+EXPORT_SYMBOL(pci_device_to_OF_node);
+
#endif /* !(CONFIG_PCI) */