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 cec0eceae552..b0f3e0082a0d 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 | |||
144 | } | 144 | } |
145 | EXPORT_SYMBOL(of_ioremap); | 145 | EXPORT_SYMBOL(of_ioremap); |
146 | 146 | ||
147 | void of_iounmap(void __iomem *base, unsigned long size) | 147 | void of_iounmap(struct resource *res, void __iomem *base, unsigned long size) |
148 | { | 148 | { |
149 | release_region((unsigned long) base, size); | 149 | if (res->flags & IORESOURCE_MEM) |
150 | release_mem_region((unsigned long) base, size); | ||
151 | else | ||
152 | release_region((unsigned long) base, size); | ||
150 | } | 153 | } |
151 | EXPORT_SYMBOL(of_iounmap); | 154 | EXPORT_SYMBOL(of_iounmap); |
152 | 155 | ||