aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-10-18 23:00:35 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-19 17:20:31 -0700
commit6bda57365a5fda4743d83a5987c6aab66e90771c (patch)
tree9a25596fd6cdca614b0f304ac280d39cf8dc6890 /arch/sparc64
parente83f214e45a80459d2931ae1259ab5fae82c8a8e (diff)
[SPARC64]: Fix of_ioremap().
Use request_mem_region() if IORESOURCE_MEM. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/of_device.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index d822c7c18e1..d3dfb2a36d4 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;