public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@ftp.linux.org.uk>
Subject: [PATCH] Provide dummy devm_ioport_* if !HAS_IOPORT
Date: Fri, 30 Mar 2007 12:00:22 +0100	[thread overview]
Message-ID: <20070330110022.GA21653@flint.arm.linux.org.uk> (raw)

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:

             reply	other threads:[~2007-03-30 11:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-30 11:00 Russell King [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070330110022.GA21653@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox