aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/qe_lib
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-09 12:13:32 -0400
committerJiri Kosina <jkosina@suse.cz>2011-06-10 08:55:36 -0400
commit28f65c11f2ffb3957259dece647a24f8ad2e241b (patch)
tree6b7621d09d10df89eedd908d4506fb9f457a909f /arch/powerpc/sysdev/qe_lib
parent140a1ef2f91a00e1d25f0878c193abdc25bf6ebe (diff)
treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'arch/powerpc/sysdev/qe_lib')
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe_ic.c2
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe_io.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c
index b2acda07220d..18e75ca19fe6 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -347,7 +347,7 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags,
347 return; 347 return;
348 } 348 }
349 349
350 qe_ic->regs = ioremap(res.start, res.end - res.start + 1); 350 qe_ic->regs = ioremap(res.start, resource_size(&res));
351 351
352 qe_ic->irqhost->host_data = qe_ic; 352 qe_ic->irqhost->host_data = qe_ic;
353 qe_ic->hc_irq = qe_ic_irq_chip; 353 qe_ic->hc_irq = qe_ic_irq_chip;
diff --git a/arch/powerpc/sysdev/qe_lib/qe_io.c b/arch/powerpc/sysdev/qe_lib/qe_io.c
index 77e4934b88c5..fd1a6c3b1721 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_io.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_io.c
@@ -41,7 +41,7 @@ int par_io_init(struct device_node *np)
41 ret = of_address_to_resource(np, 0, &res); 41 ret = of_address_to_resource(np, 0, &res);
42 if (ret) 42 if (ret)
43 return ret; 43 return ret;
44 par_io = ioremap(res.start, res.end - res.start + 1); 44 par_io = ioremap(res.start, resource_size(&res));
45 45
46 num_ports = of_get_property(np, "num-ports", NULL); 46 num_ports = of_get_property(np, "num-ports", NULL);
47 if (num_ports) 47 if (num_ports)