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>
This commit is contained in:
@@ -1435,7 +1435,7 @@ static int __devinit su_probe(struct platform_device *op)
|
||||
|
||||
rp = &op->resource[0];
|
||||
up->port.mapbase = rp->start;
|
||||
up->reg_size = (rp->end - rp->start) + 1;
|
||||
up->reg_size = resource_size(rp);
|
||||
up->port.membase = of_ioremap(rp, 0, up->reg_size, "su");
|
||||
if (!up->port.membase) {
|
||||
if (type != SU_PORT_PORT)
|
||||
|
Reference in New Issue
Block a user