Commit 575e3348cb80c3265278756778d5091d5ca4efbf
Committed by
Greg Kroah-Hartman
1 parent
d556ad4bbe
Exists in
master
and in
7 other branches
PCI: Use a weak symbol for the empty version of pcibios_add_platform_entries()
I'm not sure if this is going to fly, weak symbols work on the compilers I'm using, but whether they work for all of the affected architectures I can't say. I've cc'ed as many arch maintainers/lists as I could find. But assuming they do, we can use a weak empty definition of pcibios_add_platform_entries() to avoid having an empty definition on every arch. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 23 changed files with 7 additions and 83 deletions Side-by-side Diff
- arch/ppc/kernel/pci.c
- drivers/pci/pci-sysfs.c
- include/asm-alpha/pci.h
- include/asm-arm/pci.h
- include/asm-cris/pci.h
- include/asm-frv/pci.h
- include/asm-h8300/pci.h
- include/asm-i386/pci.h
- include/asm-ia64/pci.h
- include/asm-m68k/pci.h
- include/asm-m68knommu/pci.h
- include/asm-mips/pci.h
- include/asm-parisc/pci.h
- include/asm-powerpc/pci.h
- include/asm-ppc/pci.h
- include/asm-sh/pci.h
- include/asm-sh64/pci.h
- include/asm-sparc/pci.h
- include/asm-sparc64/pci.h
- include/asm-v850/pci.h
- include/asm-x86_64/pci.h
- include/asm-xtensa/pci.h
- include/linux/pci.h
arch/ppc/kernel/pci.c
drivers/pci/pci-sysfs.c
... | ... | @@ -600,6 +600,11 @@ |
600 | 600 | .write = pci_write_config, |
601 | 601 | }; |
602 | 602 | |
603 | +void __attribute__ ((weak)) pcibios_add_platform_entries(struct pci_dev *dev) | |
604 | +{ | |
605 | + return; | |
606 | +} | |
607 | + | |
603 | 608 | int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) |
604 | 609 | { |
605 | 610 | struct bin_attribute *rom_attr = NULL; |
include/asm-alpha/pci.h
include/asm-arm/pci.h
include/asm-cris/pci.h
... | ... | @@ -89,10 +89,6 @@ |
89 | 89 | enum pci_mmap_state mmap_state, int write_combine); |
90 | 90 | |
91 | 91 | |
92 | -static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |
93 | -{ | |
94 | -} | |
95 | - | |
96 | 92 | #endif /* __KERNEL__ */ |
97 | 93 | |
98 | 94 | /* implement the pci_ DMA API in terms of the generic device dma_ one */ |
include/asm-frv/pci.h
include/asm-h8300/pci.h
include/asm-i386/pci.h
... | ... | @@ -94,10 +94,6 @@ |
94 | 94 | enum pci_mmap_state mmap_state, int write_combine); |
95 | 95 | |
96 | 96 | |
97 | -static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |
98 | -{ | |
99 | -} | |
100 | - | |
101 | 97 | #ifdef CONFIG_PCI |
102 | 98 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
103 | 99 | enum pci_dma_burst_strategy *strat, |
include/asm-ia64/pci.h
... | ... | @@ -143,10 +143,6 @@ |
143 | 143 | return (pci_domain_nr(bus) != 0); |
144 | 144 | } |
145 | 145 | |
146 | -static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |
147 | -{ | |
148 | -} | |
149 | - | |
150 | 146 | extern void pcibios_resource_to_bus(struct pci_dev *dev, |
151 | 147 | struct pci_bus_region *region, struct resource *res); |
152 | 148 |
include/asm-m68k/pci.h
include/asm-m68knommu/pci.h
include/asm-mips/pci.h
... | ... | @@ -181,10 +181,6 @@ |
181 | 181 | /* implement the pci_ DMA API in terms of the generic device dma_ one */ |
182 | 182 | #include <asm-generic/pci-dma-compat.h> |
183 | 183 | |
184 | -static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |
185 | -{ | |
186 | -} | |
187 | - | |
188 | 184 | /* Do platform specific device initialization at pci_enable_device() time */ |
189 | 185 | extern int pcibios_plat_dev_init(struct pci_dev *dev); |
190 | 186 |
include/asm-parisc/pci.h
include/asm-powerpc/pci.h
include/asm-ppc/pci.h
include/asm-sh/pci.h
include/asm-sh64/pci.h
include/asm-sparc/pci.h
include/asm-sparc64/pci.h
... | ... | @@ -303,10 +303,6 @@ |
303 | 303 | |
304 | 304 | extern struct resource *pcibios_select_root(struct pci_dev *, struct resource *); |
305 | 305 | |
306 | -static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |
307 | -{ | |
308 | -} | |
309 | - | |
310 | 306 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
311 | 307 | { |
312 | 308 | return PCI_IRQ_NONE; |
include/asm-v850/pci.h
... | ... | @@ -116,9 +116,5 @@ |
116 | 116 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); |
117 | 117 | extern void pci_iounmap (struct pci_dev *dev, void __iomem *addr); |
118 | 118 | |
119 | -static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |
120 | -{ | |
121 | -} | |
122 | - | |
123 | 119 | #endif /* __V850_PCI_H__ */ |
include/asm-x86_64/pci.h
... | ... | @@ -135,10 +135,6 @@ |
135 | 135 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
136 | 136 | enum pci_mmap_state mmap_state, int write_combine); |
137 | 137 | |
138 | -static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |
139 | -{ | |
140 | -} | |
141 | - | |
142 | 138 | #endif /* __KERNEL__ */ |
143 | 139 | |
144 | 140 | /* generic pci stuff */ |
include/asm-xtensa/pci.h
... | ... | @@ -74,10 +74,6 @@ |
74 | 74 | /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ |
75 | 75 | #define HAVE_PCI_MMAP 1 |
76 | 76 | |
77 | -static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |
78 | -{ | |
79 | -} | |
80 | - | |
81 | 77 | #endif /* __KERNEL__ */ |
82 | 78 | |
83 | 79 | /* Implement the pci_ DMA API in terms of the generic device dma_ one */ |
include/linux/pci.h