From e0117547f77783685406589296e8cb158971ba59 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 18 Jan 2010 21:30:29 +0900 Subject: [PATCH] --- yaml --- r: 181107 b: refs/heads/master c: 4f744affc345f8b158615e0cdd01d1f4985837c3 h: refs/heads/master i: 181105: 59eb252bd5875a31c53b4dd1644d6a795ad988a7 181103: 15a9caf2fd23f7a6b3dd16952b0d0999faaf718b v: v3 --- [refs] | 2 +- trunk/arch/sh/include/asm/io.h | 5 +++-- trunk/arch/sh/mm/ioremap_fixed.c | 9 +++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index e6f92362c4e8..8685f7b605e8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0b59e38ffaf7b201ff6afe5b736365d16848c7e3 +refs/heads/master: 4f744affc345f8b158615e0cdd01d1f4985837c3 diff --git a/trunk/arch/sh/include/asm/io.h b/trunk/arch/sh/include/asm/io.h index 9aa9438c66c3..6a0dd8c1e0a9 100644 --- a/trunk/arch/sh/include/asm/io.h +++ b/trunk/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 #include #include #include @@ -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 * diff --git a/trunk/arch/sh/mm/ioremap_fixed.c b/trunk/arch/sh/mm/ioremap_fixed.c index 3a9d3d88fe8d..425f6c6bf250 100644 --- a/trunk/arch/sh/mm/ioremap_fixed.c +++ b/trunk/arch/sh/mm/ioremap_fixed.c @@ -103,7 +103,7 @@ ioremap_fixed(resource_size_t phys_addr, unsigned long size, pgprot_t prot) return map->addr; } -void __init iounmap_fixed(void __iomem *addr) +int iounmap_fixed(void __iomem *addr) { enum fixed_addresses idx; unsigned long virt_addr; @@ -122,8 +122,11 @@ void __init iounmap_fixed(void __iomem *addr) } } + /* + * If we don't match, it's not for us. + */ if (slot < 0) - return; + return -EINVAL; virt_addr = (unsigned long)addr; @@ -141,4 +144,6 @@ void __init iounmap_fixed(void __iomem *addr) map->size = 0; map->addr = NULL; + + return 0; }