aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2011-07-24 14:39:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 13:32:42 -0400
commitfea80311a939a746533a6d7e7c3183729d6a3faf (patch)
tree019499626be5febeb88a121b2a04dc0f38e274f0
parent8405b044e5238afebd7248d927c1d261d2239767 (diff)
iomap: make IOPORT/PCI mapping functions conditional
When CONFIG_PCI is not enabled, CONFIG_EISA=y, and CONFIG_GENERIC_IOMAP=y, drivers/net/3c59x.c build fails due to a recent small change to <asm-generic/iomap.h> that surrounds pci_iomap() and pci_iounmap() with #ifdef CONFIG_PCI/#endif. Since that patch to iomap.h looks correct, add stubs for pci_iomap() and pci_iounmap() with CONFIG_PCI is not enabled to fix the build errors. drivers/net/3c59x.c:1026: error: implicit declaration of function 'pci_iomap' drivers/net/3c59x.c:1038: error: implicit declaration of function 'pci_iounmap' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Jonas Bonn <jonas@southpole.se> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/asm-generic/iomap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h
index c74ef2c6e633..98dcd76ce836 100644
--- a/include/asm-generic/iomap.h
+++ b/include/asm-generic/iomap.h
@@ -71,6 +71,14 @@ extern void ioport_unmap(void __iomem *);
71struct pci_dev; 71struct pci_dev;
72extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); 72extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
73extern void pci_iounmap(struct pci_dev *dev, void __iomem *); 73extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
74#else
75struct pci_dev;
76static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
77{
78 return NULL;
79}
80static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
81{ }
74#endif 82#endif
75 83
76#endif 84#endif