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 /include/asm-generic/io.h | |
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 'include/asm-generic/io.h')
-rw-r--r-- | include/asm-generic/io.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index a1caf2d25d82..912088773a69 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h | |||
@@ -332,6 +332,7 @@ static inline void iounmap(void *addr) | |||
332 | } | 332 | } |
333 | #endif /* CONFIG_MMU */ | 333 | #endif /* CONFIG_MMU */ |
334 | 334 | ||
335 | #ifdef CONFIG_HAS_IOPORT | ||
335 | #ifndef CONFIG_GENERIC_IOMAP | 336 | #ifndef CONFIG_GENERIC_IOMAP |
336 | static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) | 337 | static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) |
337 | { | 338 | { |
@@ -345,6 +346,7 @@ static inline void ioport_unmap(void __iomem *p) | |||
345 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); | 346 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); |
346 | extern void ioport_unmap(void __iomem *p); | 347 | extern void ioport_unmap(void __iomem *p); |
347 | #endif /* CONFIG_GENERIC_IOMAP */ | 348 | #endif /* CONFIG_GENERIC_IOMAP */ |
349 | #endif /* CONFIG_HAS_IOPORT */ | ||
348 | 350 | ||
349 | #define xlate_dev_kmem_ptr(p) p | 351 | #define xlate_dev_kmem_ptr(p) p |
350 | #define xlate_dev_mem_ptr(p) __va(p) | 352 | #define xlate_dev_mem_ptr(p) __va(p) |