watchdog: nowayout is bool
[sfrench/cifs-2.6.git] / drivers / watchdog / bcm47xx_wdt.c
index 5c5f4b14fd05aee17e1e6d1f30743f8a3735a1c9..bc0e91e78e863dcc4504d2ab743e37564381dde7 100644 (file)
@@ -10,6 +10,8 @@
  *  2 of the License, or (at your option) any later version.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #define WDT_MAX_TIME           255     /* seconds */
 
 static int wdt_time = WDT_DEFAULT_TIME;
-static int nowayout = WATCHDOG_NOWAYOUT;
+static bool nowayout = WATCHDOG_NOWAYOUT;
 
 module_param(wdt_time, int, 0);
 MODULE_PARM_DESC(wdt_time, "Watchdog time in seconds. (default="
                                __MODULE_STRING(WDT_DEFAULT_TIME) ")");
 
 #ifdef CONFIG_WATCHDOG_NOWAYOUT
-module_param(nowayout, int, 0);
+module_param(nowayout, bool, 0);
 MODULE_PARM_DESC(nowayout,
                "Watchdog cannot be stopped once started (default="
                                __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
@@ -91,7 +93,7 @@ static void bcm47xx_timer_tick(unsigned long unused)
                bcm47xx_wdt_hw_start();
                mod_timer(&wdt_timer, jiffies + HZ);
        } else {
-               printk(KERN_CRIT DRV_NAME "Watchdog will fire soon!!!\n");
+               pr_crit("Watchdog will fire soon!!!\n");
        }
 }
 
@@ -140,8 +142,7 @@ static int bcm47xx_wdt_release(struct inode *inode, struct file *file)
        if (expect_release == 42) {
                bcm47xx_wdt_stop();
        } else {
-               printk(KERN_CRIT DRV_NAME
-                       ": Unexpected close, not stopping watchdog!\n");
+               pr_crit("Unexpected close, not stopping watchdog!\n");
                bcm47xx_wdt_start();
        }
 
@@ -270,8 +271,7 @@ static int __init bcm47xx_wdt_init(void)
 
        if (bcm47xx_wdt_settimeout(wdt_time)) {
                bcm47xx_wdt_settimeout(WDT_DEFAULT_TIME);
-               printk(KERN_INFO DRV_NAME ": "
-                       "wdt_time value must be 0 < wdt_time < %d, using %d\n",
+               pr_info("wdt_time value must be 0 < wdt_time < %d, using %d\n",
                        (WDT_MAX_TIME + 1), wdt_time);
        }
 
@@ -285,8 +285,8 @@ static int __init bcm47xx_wdt_init(void)
                return ret;
        }
 
-       printk(KERN_INFO "BCM47xx Watchdog Timer enabled (%d seconds%s)\n",
-                               wdt_time, nowayout ? ", nowayout" : "");
+       pr_info("BCM47xx Watchdog Timer enabled (%d seconds%s)\n",
+               wdt_time, nowayout ? ", nowayout" : "");
        return 0;
 }