All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Provide dummy devm_ioport_* if !HAS_IOPORT
@ 2007-03-30 11:00 Russell King
  2007-03-30 11:08 ` [RFC] pata_platform for ARM RiscPC Russell King
  2007-03-30 11:08 ` [PATCH] Provide dummy devm_ioport_* if !HAS_IOPORT Christoph Hellwig
  0 siblings, 2 replies; 19+ messages in thread
From: Russell King @ 2007-03-30 11:00 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton, Al Viro

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>
---
 include/linux/io.h |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/include/linux/io.h b/include/linux/io.h
index c244a0c..8cf8df6 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,
 /*
  * Managed iomap interface
  */
+#ifdef CONFIG_HAS_IOPORT
 void __iomem * devm_ioport_map(struct device *dev, unsigned long port,
 			       unsigned int nr);
 void devm_ioport_unmap(struct device *dev, void __iomem *addr);
+#else
+static inline void __iomem * devm_ioport_map(struct device *dev,
+					     unsigned long port,
+					     unsigned int nr)
+{
+	return NULL;
+}
+
+static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
+{
+}
+#endif
 
 void __iomem * devm_ioremap(struct device *dev, unsigned long offset,
 			    unsigned long size);

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2007-04-21 15:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-30 11:00 [PATCH] Provide dummy devm_ioport_* if !HAS_IOPORT Russell King
2007-03-30 11:08 ` [RFC] pata_platform for ARM RiscPC Russell King
2007-04-08 10:18   ` [RFC] pata_icside driver Russell King
2007-04-08 18:59     ` Alan Cox
2007-04-09  1:03       ` Jeff Garzik
2007-04-09  9:56         ` Alan Cox
2007-04-09 10:56           ` Jeff Garzik
2007-04-09 11:13             ` Jeff Garzik
2007-04-09 11:36               ` Russell King
2007-04-09 12:02                 ` Jeff Garzik
2007-04-08 20:09     ` Alan Cox
2007-04-09  8:18       ` Russell King
2007-04-09  8:24         ` Roland Dreier
2007-04-09  8:44           ` Russell King
2007-04-09 10:25         ` Alan Cox
2007-04-09 11:33           ` Russell King
2007-04-21 15:09     ` Russell King
2007-04-09 11:32   ` [RFC] pata_platform for ARM RiscPC Jeff Garzik
2007-03-30 11:08 ` [PATCH] Provide dummy devm_ioport_* if !HAS_IOPORT Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.