From: David S. Miller Date: Thu, 19 Oct 2006 06:00:35 +0000 (-0700) Subject: [SPARC64]: Fix of_ioremap(). X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6bda57365a5fda4743d83a5987c6aab66e90771c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [SPARC64]: Fix of_ioremap(). Use request_mem_region() if IORESOURCE_MEM. Signed-off-by: David S. Miller --- 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) 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;