Skip to content

Commit

Permalink
Provide dummy devm_ioport_* if !HAS_IOPORT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King authored and Linus Torvalds committed Apr 17, 2007
1 parent 30f3dee commit 93da287
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/linux/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 93da287

Please sign in to comment.