aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/mailbox.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2009-11-10 21:55:19 -0500
committerTony Lindgren <tony@atomide.com>2009-11-10 21:55:19 -0500
commit6d1352420901b0a74e6149a891ff4457f7199651 (patch)
treea623ed28c2cde8d3dcb4b0c8681f682f4d58017e /arch/arm/mach-omap2/mailbox.c
parentee90732456fe8e75406fdd3cd136a4bfb7ce31f5 (diff)
omap: Use resource_size
Use the resource_size function instead of manually calculating the resource size. This reduces the chance of introducing off-by-one errors and actually fixes one in mailbox.c. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/mailbox.c')
-rw-r--r--arch/arm/mach-omap2/mailbox.c2
1 files changed, 1 insertions, 1 deletions
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