aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-18 07:30:29 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-01-18 07:30:29 -0500
commit4f744affc345f8b158615e0cdd01d1f4985837c3 (patch)
treeeab721c5f19274e986fce7be609890159ffe63b9 /arch/sh/mm
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')
-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 3a9d3d88fe8d..425f6c6bf250 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)
103 return map->addr; 103 return map->addr;
104} 104}
105 105
106void __init iounmap_fixed(void __iomem *addr) 106int iounmap_fixed(void __iomem *addr)
107{ 107{
108 enum fixed_addresses idx; 108 enum fixed_addresses idx;
109 unsigned long virt_addr; 109 unsigned long virt_addr;
@@ -122,8 +122,11 @@ void __init iounmap_fixed(void __iomem *addr)
122 } 122 }
123 } 123 }
124 124
125 /*
126 * If we don't match, it's not for us.
127 */
125 if (slot < 0) 128 if (slot < 0)
126 return; 129 return -EINVAL;
127 130
128 virt_addr = (unsigned long)addr; 131 virt_addr = (unsigned long)addr;
129 132
@@ -141,4 +144,6 @@ void __init iounmap_fixed(void __iomem *addr)
141 144
142 map->size = 0; 145 map->size = 0;
143 map->addr = NULL; 146 map->addr = NULL;
147
148 return 0;
144} 149}