[WATCHDOG] rc32434_wdt.c: use resource_size()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 25 Nov 2009 02:06:26 +0000 (21:06 -0500)
committerWim Van Sebroeck <wim@iguana.be>
Wed, 2 Dec 2009 10:10:27 +0000 (10:10 +0000)
The size value passed to ioremap_nocache() is not correct.
Use resource_size() to get the correct value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/rc32434_wdt.c

index f6cccc9df022cbb55b04aa5fac43fcfd6413964c..3764af11065c27aba707c8e95bba91061aef1252 100644 (file)
@@ -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;