diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-10-18 23:00:35 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-19 17:20:31 -0700 |
commit | 6bda57365a5fda4743d83a5987c6aab66e90771c (patch) | |
tree | 9a25596fd6cdca614b0f304ac280d39cf8dc6890 | |
parent | e83f214e45a80459d2931ae1259ab5fae82c8a8e (diff) | |
download | op-kernel-dev-6bda57365a5fda4743d83a5987c6aab66e90771c.zip op-kernel-dev-6bda57365a5fda4743d83a5987c6aab66e90771c.tar.gz |
[SPARC64]: Fix of_ioremap().
Use request_mem_region() if IORESOURCE_MEM.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index d822c7c..d3dfb2a 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c @@ -131,8 +131,13 @@ static int of_device_resume(struct device * dev) void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) { unsigned long ret = res->start + offset; + struct resource *r; - if (!request_region(ret, size, name)) + if (res->flags & IORESOURCE_MEM) + r = request_mem_region(ret, size, name); + else + r = request_region(ret, size, name); + if (!r) ret = 0; return (void __iomem *) ret; |