summaryrefslogtreecommitdiff
path: root/arch/sh/include/asm/io.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-18 21:30:29 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-01-18 21:30:29 +0900
commit4f744affc345f8b158615e0cdd01d1f4985837c3 (patch)
treeeab721c5f19274e986fce7be609890159ffe63b9 /arch/sh/include/asm/io.h
parent0b59e38ffaf7b201ff6afe5b736365d16848c7e3 (diff)
sh: Make iounmap_fixed() return success/failure for iounmap() path.
This converts iounmap_fixed() to return success/error if it handled the unmap request or not. At the same time, drop the __init label, as this can be called in to later. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/io.h')
-rw-r--r--arch/sh/include/asm/io.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 9aa9438c66c3..6a0dd8c1e0a9 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -22,6 +22,7 @@
* for old compat code for I/O offseting to SuperIOs, all of which are
* better handled through the machvec ioport mapping routines these days.
*/
+#include <linux/errno.h>
#include <asm/cache.h>
#include <asm/system.h>
#include <asm/addrspace.h>
@@ -239,7 +240,7 @@ void __iounmap(void __iomem *addr);
#ifdef CONFIG_IOREMAP_FIXED
extern void __iomem *ioremap_fixed(resource_size_t, unsigned long, pgprot_t);
-extern void iounmap_fixed(void __iomem *);
+extern int iounmap_fixed(void __iomem *);
extern void ioremap_fixed_init(void);
#else
static inline void __iomem *
@@ -249,7 +250,7 @@ ioremap_fixed(resource_size t phys_addr, unsigned long size, pgprot_t prot)
}
static inline void ioremap_fixed_init(void) { }
-static inline void iounmap_fixed(void __iomem *addr) { }
+static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }
#endif
static inline void __iomem *