aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJonas Bonn <jonas@southpole.se>2011-07-02 11:23:29 -0400
committerJonas Bonn <jonas@southpole.se>2011-07-22 12:46:26 -0400
commit82ed223c264def2b15ee4bec2e8c3048092ceb5f (patch)
tree5db30cfb6bb60ce5914128ebe342f08257688aac /lib
parentf1ecc69838a2d7c8a3e1909f637d4083c071777d (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.c4
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);
224EXPORT_SYMBOL(iowrite16_rep); 224EXPORT_SYMBOL(iowrite16_rep);
225EXPORT_SYMBOL(iowrite32_rep); 225EXPORT_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 */
228void __iomem *ioport_map(unsigned long port, unsigned int nr) 229void __iomem *ioport_map(unsigned long port, unsigned int nr)
229{ 230{
@@ -238,7 +239,9 @@ void ioport_unmap(void __iomem *addr)
238} 239}
239EXPORT_SYMBOL(ioport_map); 240EXPORT_SYMBOL(ioport_map);
240EXPORT_SYMBOL(ioport_unmap); 241EXPORT_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}
281EXPORT_SYMBOL(pci_iomap); 284EXPORT_SYMBOL(pci_iomap);
282EXPORT_SYMBOL(pci_iounmap); 285EXPORT_SYMBOL(pci_iounmap);
286#endif /* CONFIG_PCI */