diff options
author | Russell King <rmk+lkml@arm.linux.org.uk> | 2007-04-17 03:32:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-17 19:36:27 -0400 |
commit | 93da28790c17345f4db10358dfb19b4c241d8ba3 (patch) | |
tree | 47616f12e51de5c8f1ccb9f0f6fcb6b458fc0720 /include/linux | |
parent | 30f3deeee81cf22546da1b0b89a937bb991dea23 (diff) |
Provide dummy devm_ioport_* if !HAS_IOPORT
Provide an dummy implementation of devm_ioport_map() and
devm_ioport_unmap() to allow drivers (eg, pata_platform) to build for
platforms where CONFIG_NO_IOPORT is selected.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/io.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/io.h b/include/linux/io.h index c244a0cc9319..09d351236379 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -33,9 +33,22 @@ int ioremap_page_range(unsigned long addr, unsigned long end, | |||
33 | /* | 33 | /* |
34 | * Managed iomap interface | 34 | * Managed iomap interface |
35 | */ | 35 | */ |
36 | #ifdef CONFIG_HAS_IOPORT | ||
36 | void __iomem * devm_ioport_map(struct device *dev, unsigned long port, | 37 | void __iomem * devm_ioport_map(struct device *dev, unsigned long port, |
37 | unsigned int nr); | 38 | unsigned int nr); |
38 | void devm_ioport_unmap(struct device *dev, void __iomem *addr); | 39 | void devm_ioport_unmap(struct device *dev, void __iomem *addr); |
40 | #else | ||
41 | static inline void __iomem *devm_ioport_map(struct device *dev, | ||
42 | unsigned long port, | ||
43 | unsigned int nr) | ||
44 | { | ||
45 | return NULL; | ||
46 | } | ||
47 | |||
48 | static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr) | ||
49 | { | ||
50 | } | ||
51 | #endif | ||
39 | 52 | ||
40 | void __iomem * devm_ioremap(struct device *dev, unsigned long offset, | 53 | void __iomem * devm_ioremap(struct device *dev, unsigned long offset, |
41 | unsigned long size); | 54 | unsigned long size); |