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>
This commit is contained in:
Paul Mundt
2010-01-18 21:30:29 +09:00
förälder 0b59e38ffa
incheckning 4f744affc3
2 ändrade filer med 10 tillägg och 4 borttagningar

Visa fil

@@ -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;
}