This uses the resource_size() function instead of explicit computation.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
iounmap(ipipe->isp5_base_addr);
res = platform_get_resource(pdev, IORESOURCE_MEM, 4);
if (res)
- release_mem_region(res->start, res->end - res->start + 1);
+ release_mem_region(res->start, resource_size(res));
}
res = platform_get_resource(pdev, IORESOURCE_MEM, i);
if (res)
release_mem_region(res->start,
- res->end - res->start + 1);
+ resource_size(res));
i++;
}
}
status = -ENOENT;
goto fail_nobase_res;
}
- res_len = res->end - res->start + 1;
+ res_len = resource_size(res);
res = request_mem_region(res->start, res_len, res->name);
if (!res) {
status = -EBUSY;
res = platform_get_resource(pdev, IORESOURCE_MEM, 5);
if (res)
release_mem_region(res->start,
- res->end - res->start + 1);
+ resource_size(res));
}