Skip to content

Commit fea8031

Browse files
rddunlaptorvalds
authored andcommitted
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 <[email protected]> Cc: Jonas Bonn <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 8405b04 commit fea8031

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/asm-generic/iomap.h

+8
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ extern void ioport_unmap(void __iomem *);
7171
struct pci_dev;
7272
extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
7373
extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
74+
#else
75+
struct pci_dev;
76+
static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
77+
{
78+
return NULL;
79+
}
80+
static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
81+
{ }
7482
#endif
7583

7684
#endif

0 commit comments

Comments
 (0)