aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
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 d822c7c18e1f..d3dfb2a36d47 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)
131void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) 131void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name)
132{ 132{
133 unsigned long ret = res->start + offset; 133 unsigned long ret = res->start + offset;
134 struct resource *r;
134 135
135 if (!request_region(ret, size, name)) 136 if (res->flags & IORESOURCE_MEM)
137 r = request_mem_region(ret, size, name);
138 else
139 r = request_region(ret, size, name);
140 if (!r)
136 ret = 0; 141 ret = 0;
137 142
138 return (void __iomem *) ret; 143 return (void __iomem *) ret;