[WATCHDOG] iTCO_wdt: clean up probe(), modify err msg
[safe/jmp/linux-2.6] / drivers / watchdog / mpcore_wdt.c
index 1130ad6..a2dc07c 100644 (file)
@@ -5,7 +5,7 @@
  *
  *     Based on the SoftDog driver:
  *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
- *                                             All Rights Reserved.
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -61,7 +61,9 @@ MODULE_PARM_DESC(nowayout,
 #define ONLY_TESTING   0
 static int mpcore_noboot = ONLY_TESTING;
 module_param(mpcore_noboot, int, 0);
-MODULE_PARM_DESC(mpcore_noboot, "MPcore watchdog action, set to 1 to ignore reboots, 0 to reboot (default=" __MODULE_STRING(ONLY_TESTING) ")");
+MODULE_PARM_DESC(mpcore_noboot, "MPcore watchdog action, "
+       "set to 1 to ignore reboots, 0 to reboot (default="
+                                       __MODULE_STRING(ONLY_TESTING) ")");
 
 /*
  *     This is the interrupt handler.  Note that we only use this
@@ -348,7 +350,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev)
                ret = -ENXIO;
                goto err_free;
        }
-       wdt->base = ioremap(res->start, res->end - res->start + 1);
+       wdt->base = ioremap(res->start, resource_size(res));
        if (!wdt->base) {
                ret = -ENOMEM;
                goto err_free;
@@ -416,7 +418,8 @@ static struct platform_driver mpcore_wdt_driver = {
        },
 };
 
-static char banner[] __initdata = KERN_INFO "MPcore Watchdog Timer: 0.1. mpcore_noboot=%d mpcore_margin=%d sec (nowayout= %d)\n";
+static char banner[] __initdata = KERN_INFO "MPcore Watchdog Timer: 0.1. "
+               "mpcore_noboot=%d mpcore_margin=%d sec (nowayout= %d)\n";
 
 static int __init mpcore_wdt_init(void)
 {