diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-10-19 02:00:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-19 20:20:31 -0400 |
commit | 6bda57365a5fda4743d83a5987c6aab66e90771c (patch) | |
tree | 9a25596fd6cdca614b0f304ac280d39cf8dc6890 /arch/sparc64/kernel/of_device.c | |
parent | e83f214e45a80459d2931ae1259ab5fae82c8a8e (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/kernel/of_device.c')
-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 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) | |||
131 | void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) | 131 | void __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; |