diff options
Diffstat (limited to 'arch/sparc64/kernel/of_device.c')
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index cec0ece..b0f3e00 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c @@ -144,9 +144,12 @@ void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned lo } EXPORT_SYMBOL(of_ioremap); -void of_iounmap(void __iomem *base, unsigned long size) +void of_iounmap(struct resource *res, void __iomem *base, unsigned long size) { - release_region((unsigned long) base, size); + if (res->flags & IORESOURCE_MEM) + release_mem_region((unsigned long) base, size); + else + release_region((unsigned long) base, size); } EXPORT_SYMBOL(of_iounmap); |