Commit fea80311 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

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: default avatarRandy Dunlap <rdunlap@xenotime.net>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8405b044
...@@ -71,6 +71,14 @@ extern void ioport_unmap(void __iomem *); ...@@ -71,6 +71,14 @@ extern void ioport_unmap(void __iomem *);
struct pci_dev; struct pci_dev;
extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
extern void pci_iounmap(struct pci_dev *dev, void __iomem *); extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
#else
struct pci_dev;
static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
{
return NULL;
}
static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
{ }
#endif #endif
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment