[PATCH] PCI: fix up errors after dma bursting patch and CONFIG_PCI=n

With CONFIG_PCI=n:

In file included from include/linux/pci.h:917,
from lib/iomap.c:6:
include/asm/pci.h:104: warning: `enum pci_dma_burst_strategy' declared inside parameter list
include/asm/pci.h:104: warning: its scope is only this definition or declaration, which is probably not what you want.
include/asm/pci.h: In function `pci_dma_burst_advice':
include/asm/pci.h:106: dereferencing pointer to incomplete type
include/asm/pci.h:106: `PCI_DMA_BURST_INFINITY' undeclared (first use in this function)
include/asm/pci.h:106: (Each undeclared identifier is reported only once
include/asm/pci.h:106: for each function it appears in.)
make[1]: *** [lib/iomap.o] Error 1

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Andrew Morton and committed by Greg Kroah-Hartman bb4a61b6 e24c2d96

+32
+2
include/asm-alpha/pci.h
··· 223 223 /* Nothing to do. */ 224 224 } 225 225 226 + #ifdef CONFIG_PCI 226 227 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 227 228 enum pci_dma_burst_strategy *strat, 228 229 unsigned long *strategy_parameter) ··· 240 239 *strat = PCI_DMA_BURST_BOUNDARY; 241 240 *strategy_parameter = cacheline_size; 242 241 } 242 + #endif 243 243 244 244 /* TODO: integrate with include/asm-generic/pci.h ? */ 245 245 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
+2
include/asm-arm/pci.h
··· 42 42 #define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) 43 43 #define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) 44 44 45 + #ifdef CONFIG_PCI 45 46 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 46 47 enum pci_dma_burst_strategy *strat, 47 48 unsigned long *strategy_parameter) ··· 50 49 *strat = PCI_DMA_BURST_INFINITY; 51 50 *strategy_parameter = ~0UL; 52 51 } 52 + #endif 53 53 54 54 #define HAVE_PCI_MMAP 55 55 extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
+2
include/asm-frv/pci.h
··· 57 57 */ 58 58 #define PCI_DMA_BUS_IS_PHYS (1) 59 59 60 + #ifdef CONFIG_PCI 60 61 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 61 62 enum pci_dma_burst_strategy *strat, 62 63 unsigned long *strategy_parameter) ··· 65 64 *strat = PCI_DMA_BURST_INFINITY; 66 65 *strategy_parameter = ~0UL; 67 66 } 67 + #endif 68 68 69 69 /* 70 70 * These are pretty much arbitary with the CoMEM implementation.
+2
include/asm-i386/pci.h
··· 99 99 { 100 100 } 101 101 102 + #ifdef CONFIG_PCI 102 103 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 103 104 enum pci_dma_burst_strategy *strat, 104 105 unsigned long *strategy_parameter) ··· 107 106 *strat = PCI_DMA_BURST_INFINITY; 108 107 *strategy_parameter = ~0UL; 109 108 } 109 + #endif 110 110 111 111 #endif /* __KERNEL__ */ 112 112
+2
include/asm-ia64/pci.h
··· 82 82 #define sg_dma_len(sg) ((sg)->dma_length) 83 83 #define sg_dma_address(sg) ((sg)->dma_address) 84 84 85 + #ifdef CONFIG_PCI 85 86 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 86 87 enum pci_dma_burst_strategy *strat, 87 88 unsigned long *strategy_parameter) ··· 99 98 *strat = PCI_DMA_BURST_MULTIPLE; 100 99 *strategy_parameter = cacheline_size; 101 100 } 101 + #endif 102 102 103 103 #define HAVE_PCI_MMAP 104 104 extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
+2
include/asm-mips/pci.h
··· 130 130 extern void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, 131 131 dma64_addr_t dma_addr, size_t len, int direction); 132 132 133 + #ifdef CONFIG_PCI 133 134 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 134 135 enum pci_dma_burst_strategy *strat, 135 136 unsigned long *strategy_parameter) ··· 138 137 *strat = PCI_DMA_BURST_INFINITY; 139 138 *strategy_parameter = ~0UL; 140 139 } 140 + #endif 141 141 142 142 extern void pcibios_resource_to_bus(struct pci_dev *dev, 143 143 struct pci_bus_region *region, struct resource *res);
+2
include/asm-parisc/pci.h
··· 230 230 /* export the pci_ DMA API in terms of the dma_ one */ 231 231 #include <asm-generic/pci-dma-compat.h> 232 232 233 + #ifdef CONFIG_PCI 233 234 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 234 235 enum pci_dma_burst_strategy *strat, 235 236 unsigned long *strategy_parameter) ··· 247 246 *strat = PCI_DMA_BURST_MULTIPLE; 248 247 *strategy_parameter = cacheline_size; 249 248 } 249 + #endif 250 250 251 251 extern void 252 252 pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
+2
include/asm-ppc/pci.h
··· 69 69 #define pci_unmap_len(PTR, LEN_NAME) (0) 70 70 #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) 71 71 72 + #ifdef CONFIG_PCI 72 73 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 73 74 enum pci_dma_burst_strategy *strat, 74 75 unsigned long *strategy_parameter) ··· 77 76 *strat = PCI_DMA_BURST_INFINITY; 78 77 *strategy_parameter = ~0UL; 79 78 } 79 + #endif 80 80 81 81 /* 82 82 * At present there are very few 32-bit PPC machines that can have
+2
include/asm-ppc64/pci.h
··· 78 78 return 0; 79 79 } 80 80 81 + #ifdef CONFIG_PCI 81 82 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 82 83 enum pci_dma_burst_strategy *strat, 83 84 unsigned long *strategy_parameter) ··· 95 94 *strat = PCI_DMA_BURST_MULTIPLE; 96 95 *strategy_parameter = cacheline_size; 97 96 } 97 + #endif 98 98 99 99 extern int pci_domain_nr(struct pci_bus *bus); 100 100
+2
include/asm-sh/pci.h
··· 96 96 #define sg_dma_address(sg) (virt_to_bus((sg)->dma_address)) 97 97 #define sg_dma_len(sg) ((sg)->length) 98 98 99 + #ifdef CONFIG_PCI 99 100 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 100 101 enum pci_dma_burst_strategy *strat, 101 102 unsigned long *strategy_parameter) ··· 104 103 *strat = PCI_DMA_BURST_INFINITY; 105 104 *strategy_parameter = ~0UL; 106 105 } 106 + #endif 107 107 108 108 /* Board-specific fixup routines. */ 109 109 extern void pcibios_fixup(void);
+2
include/asm-sh64/pci.h
··· 86 86 #define sg_dma_address(sg) ((sg)->dma_address) 87 87 #define sg_dma_len(sg) ((sg)->length) 88 88 89 + #ifdef CONFIG_PCI 89 90 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 90 91 enum pci_dma_burst_strategy *strat, 91 92 unsigned long *strategy_parameter) ··· 94 93 *strat = PCI_DMA_BURST_INFINITY; 95 94 *strategy_parameter = ~0UL; 96 95 } 96 + #endif 97 97 98 98 /* Board-specific fixup routines. */ 99 99 extern void pcibios_fixup(void);
+2
include/asm-sparc/pci.h
··· 144 144 145 145 #define pci_dac_dma_supported(dev, mask) (0) 146 146 147 + #ifdef CONFIG_PCI 147 148 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 148 149 enum pci_dma_burst_strategy *strat, 149 150 unsigned long *strategy_parameter) ··· 152 151 *strat = PCI_DMA_BURST_INFINITY; 153 152 *strategy_parameter = ~0UL; 154 153 } 154 + #endif 155 155 156 156 static inline void pcibios_add_platform_entries(struct pci_dev *dev) 157 157 {
+2
include/asm-sparc64/pci.h
··· 220 220 return (dma_addr == PCI_DMA_ERROR_CODE); 221 221 } 222 222 223 + #ifdef CONFIG_PCI 223 224 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 224 225 enum pci_dma_burst_strategy *strat, 225 226 unsigned long *strategy_parameter) ··· 237 236 *strat = PCI_DMA_BURST_BOUNDARY; 238 237 *strategy_parameter = cacheline_size; 239 238 } 239 + #endif 240 240 241 241 /* Return the index of the PCI controller for device PDEV. */ 242 242
+2
include/asm-v850/pci.h
··· 81 81 pci_free_consistent (struct pci_dev *pdev, size_t size, void *cpu_addr, 82 82 dma_addr_t dma_addr); 83 83 84 + #ifdef CONFIG_PCI 84 85 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 85 86 enum pci_dma_burst_strategy *strat, 86 87 unsigned long *strategy_parameter) ··· 89 88 *strat = PCI_DMA_BURST_INFINITY; 90 89 *strategy_parameter = ~0UL; 91 90 } 91 + #endif 92 92 93 93 static inline void pcibios_add_platform_entries(struct pci_dev *dev) 94 94 {
+2
include/asm-x86_64/pci.h
··· 123 123 flush_write_buffers(); 124 124 } 125 125 126 + #ifdef CONFIG_PCI 126 127 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 127 128 enum pci_dma_burst_strategy *strat, 128 129 unsigned long *strategy_parameter) ··· 131 130 *strat = PCI_DMA_BURST_INFINITY; 132 131 *strategy_parameter = ~0UL; 133 132 } 133 + #endif 134 134 135 135 #define HAVE_PCI_MMAP 136 136 extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
+2
include/linux/pci.h
··· 985 985 } 986 986 #endif 987 987 988 + #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) 989 + 988 990 #endif /* !CONFIG_PCI */ 989 991 990 992 /* these helpers provide future and backwards compatibility