diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-12-28 21:01:32 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-31 14:06:05 -0800 |
commit | e3a411a3dfc1d633504aa63efab32b7e00318454 (patch) | |
tree | 2ba6117448edd7056c8fa48cc6a696ae73a6c21a /arch/sparc64/kernel | |
parent | 6fc5bae797a6632bbccdd49a1b6a96121368a4b9 (diff) | |
download | op-kernel-dev-e3a411a3dfc1d633504aa63efab32b7e00318454.zip op-kernel-dev-e3a411a3dfc1d633504aa63efab32b7e00318454.tar.gz |
[SPARC64]: Fix of_iounmap() region release.
We need to pass in the resource otherwise we cannot
release the region properly. We must know whether it is
an I/O or MEM resource.
Spotted by Eric Brower.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel')
-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); |