From 06794eaeb766989e450c1b459ae28da76e1f8719 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 23 Mar 2011 12:55:36 -0700 Subject: treewide: Fix iomap resource size miscalculations Convert off-by-1 r->end - r->start to resource_size(r) Signed-off-by: Joe Perches Acked-by: David Brown Acked-by: Linus Walleij Acked-by: Florian Fainelli Acked-by: Wim Van Sebroeck Acked-by: Ralf Baechle Signed-off-by: Jiri Kosina --- drivers/watchdog/bcm63xx_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/watchdog') diff --git a/drivers/watchdog/bcm63xx_wdt.c b/drivers/watchdog/bcm63xx_wdt.c index 3c5045a206dd..5064e8317521 100644 --- a/drivers/watchdog/bcm63xx_wdt.c +++ b/drivers/watchdog/bcm63xx_wdt.c @@ -248,7 +248,7 @@ static int __devinit bcm63xx_wdt_probe(struct platform_device *pdev) return -ENODEV; } - bcm63xx_wdt_device.regs = ioremap_nocache(r->start, r->end - r->start); + bcm63xx_wdt_device.regs = ioremap_nocache(r->start, resource_size(r)); if (!bcm63xx_wdt_device.regs) { dev_err(&pdev->dev, "failed to remap I/O resources\n"); return -ENXIO; -- cgit v1.2.3