summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/ioremap_fixed.c
diff options
context:
space:
mode:
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 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)
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;
}