summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/ioremap_fixed.c
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/mm/ioremap_fixed.c
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/mm/ioremap_fixed.c')
-rw-r--r--arch/sh/mm/ioremap_fixed.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/sh/mm/ioremap_fixed.c b/arch/sh/mm/ioremap_fixed.c
index 3a9d3d88fe8..425f6c6bf25 100644
--- a/arch/sh/mm/ioremap_fixed.c
+++ b/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;
}