aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/of_device.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-20 10:27:55 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-20 10:27:55 -0700
commitd2c5f06e361f18be0d7b75988ce6a9e8800a8113 (patch)
tree3e49fffc05e1d7aa1413ffcdc1dcb41521fd0875 /arch/sparc64/kernel/of_device.c
parentc1448791648d44ecbf8cadb192704e3e6eb3bb0e (diff)
parent6cf431d77c3e917399a847e3a7ec239d5163056b (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC]: Clean up asm-sparc/elf.h pollution in userspace. [SPARC64]: Fix of_ioremap(). [SPARC64]: Compute dma_end argument to sabre_pbm_init() correctly.
Diffstat (limited to 'arch/sparc64/kernel/of_device.c')
-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;