treewide: Convert uses of struct resource to resource_size(ptr)
[deliverable/linux.git] / arch / arm / plat-s5p / sysmmu.c
index 54f5eddc921df7dadee61d0b8f734092c1452fd7..e1cbc728c7759b1e1f54923f11120b3ea4647cb2 100644 (file)
@@ -232,8 +232,8 @@ static int s5p_sysmmu_probe(struct platform_device *pdev)
                        goto err_res;
                }
 
-               mem = request_mem_region(res->start,
-                               ((res->end) - (res->start)) + 1, pdev->name);
+               mem = request_mem_region(res->start, resource_size(res),
+                                        pdev->name);
                if (!mem) {
                        dev_err(dev, "Failed to request the memory region of %s.\n",
                                                        sysmmu_ips_name[i]);
@@ -241,7 +241,7 @@ static int s5p_sysmmu_probe(struct platform_device *pdev)
                        goto err_res;
                }
 
-               sysmmusfrs[i] = ioremap(res->start, res->end - res->start + 1);
+               sysmmusfrs[i] = ioremap(res->start, resource_size(res));
                if (!sysmmusfrs[i]) {
                        dev_err(dev, "Failed to ioremap() for %s.\n",
                                                        sysmmu_ips_name[i]);
This page took 0.03456 seconds and 5 git commands to generate.