diff options
author | Jonas Bonn <jonas@southpole.se> | 2011-07-02 11:23:29 -0400 |
---|---|---|
committer | Jonas Bonn <jonas@southpole.se> | 2011-07-22 12:46:26 -0400 |
commit | 82ed223c264def2b15ee4bec2e8c3048092ceb5f (patch) | |
tree | 5db30cfb6bb60ce5914128ebe342f08257688aac /lib | |
parent | f1ecc69838a2d7c8a3e1909f637d4083c071777d (diff) |
iomap: make IOPORT/PCI mapping functions conditional
Use the CONFIG_HAS_IOPORT and CONFIG_PCI options to decide whether or
not functions for mapping these areas are provided.
Signed-off-by: Jonas Bonn <jonas@southpole.se>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/iomap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/iomap.c b/lib/iomap.c index d32229385151..5dbcb4b2d864 100644 --- a/lib/iomap.c +++ b/lib/iomap.c | |||
@@ -224,6 +224,7 @@ EXPORT_SYMBOL(iowrite8_rep); | |||
224 | EXPORT_SYMBOL(iowrite16_rep); | 224 | EXPORT_SYMBOL(iowrite16_rep); |
225 | EXPORT_SYMBOL(iowrite32_rep); | 225 | EXPORT_SYMBOL(iowrite32_rep); |
226 | 226 | ||
227 | #ifdef CONFIG_HAS_IOPORT | ||
227 | /* Create a virtual mapping cookie for an IO port range */ | 228 | /* Create a virtual mapping cookie for an IO port range */ |
228 | void __iomem *ioport_map(unsigned long port, unsigned int nr) | 229 | void __iomem *ioport_map(unsigned long port, unsigned int nr) |
229 | { | 230 | { |
@@ -238,7 +239,9 @@ void ioport_unmap(void __iomem *addr) | |||
238 | } | 239 | } |
239 | EXPORT_SYMBOL(ioport_map); | 240 | EXPORT_SYMBOL(ioport_map); |
240 | EXPORT_SYMBOL(ioport_unmap); | 241 | EXPORT_SYMBOL(ioport_unmap); |
242 | #endif /* CONFIG_HAS_IOPORT */ | ||
241 | 243 | ||
244 | #ifdef CONFIG_PCI | ||
242 | /** | 245 | /** |
243 | * pci_iomap - create a virtual mapping cookie for a PCI BAR | 246 | * pci_iomap - create a virtual mapping cookie for a PCI BAR |
244 | * @dev: PCI device that owns the BAR | 247 | * @dev: PCI device that owns the BAR |
@@ -280,3 +283,4 @@ void pci_iounmap(struct pci_dev *dev, void __iomem * addr) | |||
280 | } | 283 | } |
281 | EXPORT_SYMBOL(pci_iomap); | 284 | EXPORT_SYMBOL(pci_iomap); |
282 | EXPORT_SYMBOL(pci_iounmap); | 285 | EXPORT_SYMBOL(pci_iounmap); |
286 | #endif /* CONFIG_PCI */ | ||