aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/gpmc.c2
-rw-r--r--arch/arm/mach-omap2/mailbox.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 15876828db23..f8657568b1ba 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -366,7 +366,7 @@ int gpmc_cs_request(int cs, unsigned long size, unsigned long *base)
366 if (r < 0) 366 if (r < 0)
367 goto out; 367 goto out;
368 368
369 gpmc_cs_enable_mem(cs, res->start, res->end - res->start + 1); 369 gpmc_cs_enable_mem(cs, res->start, resource_size(res));
370 *base = res->start; 370 *base = res->start;
371 gpmc_cs_set_reserved(cs, 1); 371 gpmc_cs_set_reserved(cs, 1);
372out: 372out:
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index c035ad3426d0..ef57b38a56a4 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -300,7 +300,7 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
300 dev_err(&pdev->dev, "invalid mem resource\n"); 300 dev_err(&pdev->dev, "invalid mem resource\n");
301 return -ENODEV; 301 return -ENODEV;
302 } 302 }
303 mbox_base = ioremap(res->start, res->end - res->start); 303 mbox_base = ioremap(res->start, resource_size(res));
304 if (!mbox_base) 304 if (!mbox_base)
305 return -ENOMEM; 305 return -ENOMEM;
306 306