aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/mbox-db5500.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-03-23 15:55:36 -0400
committerJiri Kosina <jkosina@suse.cz>2011-04-10 11:01:04 -0400
commit06794eaeb766989e450c1b459ae28da76e1f8719 (patch)
tree669739c584a5e404e06294d075b990378ef4bf4c /arch/arm/mach-ux500/mbox-db5500.c
parentb0c3af5ef0d7b38eb1ba522becd47123ac9736d2 (diff)
treewide: Fix iomap resource size miscalculations
Convert off-by-1 r->end - r->start to resource_size(r) Signed-off-by: Joe Perches <joe@perches.com> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Florian Fainelli <florian@openwrt.org> Acked-by: Wim Van Sebroeck <wim@iguana.be> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'arch/arm/mach-ux500/mbox-db5500.c')
-rw-r--r--arch/arm/mach-ux500/mbox-db5500.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-ux500/mbox-db5500.c b/arch/arm/mach-ux500/mbox-db5500.c
index a4ffb9f4f461..2b2d51caf9d8 100644
--- a/arch/arm/mach-ux500/mbox-db5500.c
+++ b/arch/arm/mach-ux500/mbox-db5500.c
@@ -416,8 +416,7 @@ struct mbox *mbox_setup(u8 mbox_id, mbox_recv_cb_t *mbox_cb, void *priv)
416 dev_dbg(&(mbox->pdev->dev), 416 dev_dbg(&(mbox->pdev->dev),
417 "Resource name: %s start: 0x%X, end: 0x%X\n", 417 "Resource name: %s start: 0x%X, end: 0x%X\n",
418 resource->name, resource->start, resource->end); 418 resource->name, resource->start, resource->end);
419 mbox->virtbase_peer = 419 mbox->virtbase_peer = ioremap(resource->start, resource_size(resource));
420 ioremap(resource->start, resource->end - resource->start);
421 if (!mbox->virtbase_peer) { 420 if (!mbox->virtbase_peer) {
422 dev_err(&(mbox->pdev->dev), "Unable to ioremap peer mbox\n"); 421 dev_err(&(mbox->pdev->dev), "Unable to ioremap peer mbox\n");
423 mbox = NULL; 422 mbox = NULL;
@@ -440,8 +439,7 @@ struct mbox *mbox_setup(u8 mbox_id, mbox_recv_cb_t *mbox_cb, void *priv)
440 dev_dbg(&(mbox->pdev->dev), 439 dev_dbg(&(mbox->pdev->dev),
441 "Resource name: %s start: 0x%X, end: 0x%X\n", 440 "Resource name: %s start: 0x%X, end: 0x%X\n",
442 resource->name, resource->start, resource->end); 441 resource->name, resource->start, resource->end);
443 mbox->virtbase_local = 442 mbox->virtbase_local = ioremap(resource->start, resource_size(resource));
444 ioremap(resource->start, resource->end - resource->start);
445 if (!mbox->virtbase_local) { 443 if (!mbox->virtbase_local) {
446 dev_err(&(mbox->pdev->dev), "Unable to ioremap local mbox\n"); 444 dev_err(&(mbox->pdev->dev), "Unable to ioremap local mbox\n");
447 mbox = NULL; 445 mbox = NULL;