[SPARC]: Provide pci_device_to_OF_node() just like powerpc.

Signed-off-by: David S. Miller <davem@davemloft.net>

+22
+8
arch/sparc/kernel/pcic.c
··· 944 944 return -ENXIO; 945 945 } 946 946 947 + struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) 948 + { 949 + struct pcidev_cookie *pc = pdev->sysdata; 950 + 951 + return pc->prom_node; 952 + } 953 + EXPORT_SYMBOL(pci_device_to_OF_node); 954 + 947 955 /* 948 956 * This probably belongs here rather than ioport.c because 949 957 * we do not want this crud linked into SBus kernels.
+8
arch/sparc64/kernel/pci.c
··· 681 681 } 682 682 #endif /* !(CONFIG_PCI_MSI) */ 683 683 684 + struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) 685 + { 686 + struct pcidev_cookie *pc = pdev->sysdata; 687 + 688 + return pc->op->node; 689 + } 690 + EXPORT_SYMBOL(pci_device_to_OF_node); 691 + 684 692 #endif /* !(CONFIG_PCI) */
+3
include/asm-sparc/pci.h
··· 165 165 return (dma_addr == PCI_DMA_ERROR_CODE); 166 166 } 167 167 168 + struct device_node; 169 + extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); 170 + 168 171 #endif /* __KERNEL__ */ 169 172 170 173 /* generic pci stuff */
+3
include/asm-sparc64/pci.h
··· 312 312 return PCI_IRQ_NONE; 313 313 } 314 314 315 + struct device_node; 316 + extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); 317 + 315 318 #endif /* __KERNEL__ */ 316 319 317 320 #endif /* __SPARC64_PCI_H */