diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 00a39760877b..987ec6782f99 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -153,7 +153,7 @@ void __iomem *of_ioremap(struct resource *res, unsigned long offset, | |||
153 | } | 153 | } |
154 | EXPORT_SYMBOL(of_ioremap); | 154 | EXPORT_SYMBOL(of_ioremap); |
155 | 155 | ||
156 | void of_iounmap(void __iomem *base, unsigned long size) | 156 | void of_iounmap(struct resource *res, void __iomem *base, unsigned long size) |
157 | { | 157 | { |
158 | iounmap(base); | 158 | iounmap(base); |
159 | } | 159 | } |
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 | ||