diff options
-rw-r--r-- | arch/microblaze/include/asm/pci-bridge.h | 5 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pci-bridge.h | 5 | ||||
-rw-r--r-- | arch/sparc/include/asm/pci_32.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/pci_64.h | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/pci.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/pcic.c | 8 | ||||
-rw-r--r-- | arch/x86/include/asm/prom.h | 5 | ||||
-rw-r--r-- | include/linux/pci.h | 5 |
8 files changed, 5 insertions, 35 deletions
diff --git a/arch/microblaze/include/asm/pci-bridge.h b/arch/microblaze/include/asm/pci-bridge.h index 6bddc0701a07..0d74d031e2a3 100644 --- a/arch/microblaze/include/asm/pci-bridge.h +++ b/arch/microblaze/include/asm/pci-bridge.h | |||
@@ -102,11 +102,6 @@ struct pci_controller { | |||
102 | }; | 102 | }; |
103 | 103 | ||
104 | #ifdef CONFIG_PCI | 104 | #ifdef CONFIG_PCI |
105 | static inline struct device_node *pci_device_to_OF_node(struct pci_dev *dev) | ||
106 | { | ||
107 | return dev->dev.of_node; | ||
108 | } | ||
109 | |||
110 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) | 105 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) |
111 | { | 106 | { |
112 | return bus->dev.of_node; | 107 | return bus->dev.of_node; |
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index 3e6869476e55..578060ef99ad 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
@@ -169,11 +169,6 @@ static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus) | |||
169 | return bus->sysdata; | 169 | return bus->sysdata; |
170 | } | 170 | } |
171 | 171 | ||
172 | static inline struct device_node *pci_device_to_OF_node(struct pci_dev *dev) | ||
173 | { | ||
174 | return dev->dev.of_node; | ||
175 | } | ||
176 | |||
177 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) | 172 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) |
178 | { | 173 | { |
179 | return bus->dev.of_node; | 174 | return bus->dev.of_node; |
diff --git a/arch/sparc/include/asm/pci_32.h b/arch/sparc/include/asm/pci_32.h index 332ac9ab36bc..4d0c39a931c5 100644 --- a/arch/sparc/include/asm/pci_32.h +++ b/arch/sparc/include/asm/pci_32.h | |||
@@ -42,9 +42,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
42 | } | 42 | } |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | struct device_node; | ||
46 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); | ||
47 | |||
48 | #endif /* __KERNEL__ */ | 45 | #endif /* __KERNEL__ */ |
49 | 46 | ||
50 | /* generic pci stuff */ | 47 | /* generic pci stuff */ |
diff --git a/arch/sparc/include/asm/pci_64.h b/arch/sparc/include/asm/pci_64.h index 948b686ec089..2614d96141c9 100644 --- a/arch/sparc/include/asm/pci_64.h +++ b/arch/sparc/include/asm/pci_64.h | |||
@@ -91,9 +91,6 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
91 | return PCI_IRQ_NONE; | 91 | return PCI_IRQ_NONE; |
92 | } | 92 | } |
93 | 93 | ||
94 | struct device_node; | ||
95 | extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev); | ||
96 | |||
97 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER | 94 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER |
98 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, | 95 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, |
99 | const struct resource *rsrc, | 96 | const struct resource *rsrc, |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index e539d23dec9d..80a87e2a3e7c 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -1021,12 +1021,6 @@ void arch_teardown_msi_irq(unsigned int irq) | |||
1021 | } | 1021 | } |
1022 | #endif /* !(CONFIG_PCI_MSI) */ | 1022 | #endif /* !(CONFIG_PCI_MSI) */ |
1023 | 1023 | ||
1024 | struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | ||
1025 | { | ||
1026 | return pdev->dev.of_node; | ||
1027 | } | ||
1028 | EXPORT_SYMBOL(pci_device_to_OF_node); | ||
1029 | |||
1030 | static void ali_sound_dma_hack(struct pci_dev *pdev, int set_bit) | 1024 | static void ali_sound_dma_hack(struct pci_dev *pdev, int set_bit) |
1031 | { | 1025 | { |
1032 | struct pci_dev *ali_isa_bridge; | 1026 | struct pci_dev *ali_isa_bridge; |
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 948601a066ff..a19f04195478 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -885,14 +885,6 @@ int pcibios_assign_resource(struct pci_dev *pdev, int resource) | |||
885 | return -ENXIO; | 885 | return -ENXIO; |
886 | } | 886 | } |
887 | 887 | ||
888 | struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | ||
889 | { | ||
890 | struct pcidev_cookie *pc = pdev->sysdata; | ||
891 | |||
892 | return pc->prom_node; | ||
893 | } | ||
894 | EXPORT_SYMBOL(pci_device_to_OF_node); | ||
895 | |||
896 | /* | 888 | /* |
897 | * This probably belongs here rather than ioport.c because | 889 | * This probably belongs here rather than ioport.c because |
898 | * we do not want this crud linked into SBus kernels. | 890 | * we do not want this crud linked into SBus kernels. |
diff --git a/arch/x86/include/asm/prom.h b/arch/x86/include/asm/prom.h index 971e0b46446e..dd6066a56346 100644 --- a/arch/x86/include/asm/prom.h +++ b/arch/x86/include/asm/prom.h | |||
@@ -31,11 +31,6 @@ extern void x86_add_irq_domains(void); | |||
31 | void __cpuinit x86_of_pci_init(void); | 31 | void __cpuinit x86_of_pci_init(void); |
32 | void x86_dtb_init(void); | 32 | void x86_dtb_init(void); |
33 | 33 | ||
34 | static inline struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | ||
35 | { | ||
36 | return pdev ? pdev->dev.of_node : NULL; | ||
37 | } | ||
38 | |||
39 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) | 34 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) |
40 | { | 35 | { |
41 | return pci_device_to_OF_node(bus->self); | 36 | return pci_device_to_OF_node(bus->self); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index e5086e9a9bf7..795e6a56d8cd 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1600,6 +1600,11 @@ extern void pci_release_bus_of_node(struct pci_bus *bus); | |||
1600 | /* Arch may override this (weak) */ | 1600 | /* Arch may override this (weak) */ |
1601 | extern struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus); | 1601 | extern struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus); |
1602 | 1602 | ||
1603 | static inline struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | ||
1604 | { | ||
1605 | return pdev ? pdev->dev.of_node : NULL; | ||
1606 | } | ||
1607 | |||
1603 | #else /* CONFIG_OF */ | 1608 | #else /* CONFIG_OF */ |
1604 | static inline void pci_set_of_node(struct pci_dev *dev) { } | 1609 | static inline void pci_set_of_node(struct pci_dev *dev) { } |
1605 | static inline void pci_release_of_node(struct pci_dev *dev) { } | 1610 | static inline void pci_release_of_node(struct pci_dev *dev) { } |