]> Pileus Git - ~andy/linux/blobdiff - drivers/watchdog/sch311x_wdt.c
[SCSI] be2iscsi: Fix double free of MCCQ info memory.
[~andy/linux] / drivers / watchdog / sch311x_wdt.c
index 029467e34636f6b057e3c93ac5bdf7b524de945c..bd86f32d63ab8dc5f5f57d80f55dd4fbb7dcb6bd 100644 (file)
@@ -18,6 +18,8 @@
  *     Includes, defines, variables, module parameters, ...
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 /* Includes */
 #include <linux/module.h>              /* For module specific items */
 #include <linux/moduleparam.h>         /* For new moduleparam's */
@@ -37,7 +39,6 @@
 
 /* Module and version information */
 #define DRV_NAME       "sch311x_wdt"
-#define PFX            DRV_NAME ": "
 
 /* Runtime registers */
 #define RESGEN                 0x1d
@@ -79,8 +80,8 @@ MODULE_PARM_DESC(timeout,
        "Watchdog timeout in seconds. 1<= timeout <=15300, default="
                __MODULE_STRING(WATCHDOG_TIMEOUT) ".");
 
-static int nowayout = WATCHDOG_NOWAYOUT;
-module_param(nowayout, int, 0);
+static bool nowayout = WATCHDOG_NOWAYOUT;
+module_param(nowayout, bool, 0);
 MODULE_PARM_DESC(nowayout,
        "Watchdog cannot be stopped once started (default="
                __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
@@ -323,8 +324,7 @@ static int sch311x_wdt_close(struct inode *inode, struct file *file)
        if (sch311x_wdt_expect_close == 42) {
                sch311x_wdt_stop();
        } else {
-               printk(KERN_CRIT PFX
-                               "Unexpected close, not stopping watchdog!\n");
+               pr_crit("Unexpected close, not stopping watchdog!\n");
                sch311x_wdt_keepalive();
        }
        clear_bit(0, &sch311x_wdt_is_open);
@@ -504,20 +504,19 @@ static int __init sch311x_detect(int sio_config_port, unsigned short *addr)
 
        /* Check if Logical Device Register is currently active */
        if ((sch311x_sio_inb(sio_config_port, 0x30) & 0x01) == 0)
-               printk(KERN_INFO PFX "Seems that LDN 0x0a is not active...\n");
+               pr_info("Seems that LDN 0x0a is not active...\n");
 
        /* Get the base address of the runtime registers */
        base_addr = (sch311x_sio_inb(sio_config_port, 0x60) << 8) |
                           sch311x_sio_inb(sio_config_port, 0x61);
        if (!base_addr) {
-               printk(KERN_ERR PFX "Base address not set.\n");
+               pr_err("Base address not set\n");
                err = -ENODEV;
                goto exit;
        }
        *addr = base_addr;
 
-       printk(KERN_INFO PFX "Found an SMSC SCH311%d chip at 0x%04x\n",
-               dev_id, base_addr);
+       pr_info("Found an SMSC SCH311%d chip at 0x%04x\n", dev_id, base_addr);
 
 exit:
        sch311x_sio_exit(sio_config_port);