From: H Hartley Sweeten Date: Wed, 25 Nov 2009 02:06:26 +0000 (-0500) Subject: [WATCHDOG] rc32434_wdt.c: use resource_size() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=be088b139f5244b23ee931afb195eee236b7ff33;p=openwrt%2Fstaging%2Fblogic.git [WATCHDOG] rc32434_wdt.c: use resource_size() The size value passed to ioremap_nocache() is not correct. Use resource_size() to get the correct value. Signed-off-by: H Hartley Sweeten Cc: Phil Sutter Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/rc32434_wdt.c b/drivers/watchdog/rc32434_wdt.c index f6cccc9df022..3764af11065c 100644 --- a/drivers/watchdog/rc32434_wdt.c +++ b/drivers/watchdog/rc32434_wdt.c @@ -276,7 +276,7 @@ static int __devinit rc32434_wdt_probe(struct platform_device *pdev) return -ENODEV; } - wdt_reg = ioremap_nocache(r->start, r->end - r->start); + wdt_reg = ioremap_nocache(r->start, resource_size(r)); if (!wdt_reg) { printk(KERN_ERR PFX "failed to remap I/O resources\n"); return -ENXIO;