Skip to content

Commit

Permalink
[WATCHDOG] rc32434_wdt.c: use resource_size()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Wim Van Sebroeck committed Dec 2, 2009
1 parent 2127816 commit be088b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/rc32434_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit be088b1

Please sign in to comment.