diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-10 22:30:45 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-10 22:30:45 +0400 |
commit | 06eb4eafbdc0796d741d139a44f1253278da8611 (patch) | |
tree | fbdb44317130c371928154c9e6903e699fe2b995 /drivers/watchdog/f71808e_wdt.c | |
parent | 32ed53b83ea5ec26a4dba90e18f5e0ff6c71eb48 (diff) | |
parent | f68e556e23d1a4176b563bcb25d8baf2c5313f91 (diff) | |
download | linux-06eb4eafbdc0796d741d139a44f1253278da8611.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/watchdog/f71808e_wdt.c')
-rw-r--r-- | drivers/watchdog/f71808e_wdt.c | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c index e45ca2b4bfbe..c65b0a5a020c 100644 --- a/drivers/watchdog/f71808e_wdt.c +++ b/drivers/watchdog/f71808e_wdt.c @@ -19,6 +19,8 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/err.h> #include <linux/fs.h> #include <linux/init.h> @@ -189,8 +191,7 @@ static inline int superio_enter(int base) { /* Don't step on other drivers' I/O space by accident */ if (!request_muxed_region(base, 2, DRVNAME)) { - printk(KERN_ERR DRVNAME ": I/O address 0x%04x already in use\n", - (int)base); + pr_err("I/O address 0x%04x already in use\n", (int)base); return -EBUSY; } @@ -217,7 +218,7 @@ static int watchdog_set_timeout(int timeout) { if (timeout <= 0 || timeout > max_timeout) { - printk(KERN_ERR DRVNAME ": watchdog timeout out of range\n"); + pr_err("watchdog timeout out of range\n"); return -EINVAL; } @@ -252,7 +253,7 @@ static int watchdog_set_pulse_width(unsigned int pw) } else if (pw <= 5000) { watchdog.pulse_val = 3; } else { - printk(KERN_ERR DRVNAME ": pulse width out of range\n"); + pr_err("pulse width out of range\n"); err = -EINVAL; goto exit_unlock; } @@ -309,8 +310,7 @@ static int f71862fg_pin_configure(unsigned short ioaddr) if (ioaddr) superio_set_bit(ioaddr, SIO_REG_MFUNCT1, 1); } else { - printk(KERN_ERR DRVNAME ": Invalid argument f71862fg_pin=%d\n", - f71862fg_pin); + pr_err("Invalid argument f71862fg_pin=%d\n", f71862fg_pin); return -EINVAL; } return 0; @@ -487,8 +487,7 @@ static int watchdog_release(struct inode *inode, struct file *file) if (!watchdog.expect_close) { watchdog_keepalive(); - printk(KERN_CRIT DRVNAME - ": Unexpected close, not stopping watchdog!\n"); + pr_crit("Unexpected close, not stopping watchdog!\n"); } else if (!nowayout) { watchdog_stop(); } @@ -672,25 +671,22 @@ static int __init watchdog_init(int sioaddr) err = misc_register(&watchdog_miscdev); if (err) { - printk(KERN_ERR DRVNAME - ": cannot register miscdev on minor=%d\n", - watchdog_miscdev.minor); + pr_err("cannot register miscdev on minor=%d\n", + watchdog_miscdev.minor); goto exit_reboot; } if (start_withtimeout) { if (start_withtimeout <= 0 || start_withtimeout > max_timeout) { - printk(KERN_ERR DRVNAME - ": starting timeout out of range\n"); + pr_err("starting timeout out of range\n"); err = -EINVAL; goto exit_miscdev; } err = watchdog_start(); if (err) { - printk(KERN_ERR DRVNAME - ": cannot start watchdog timer\n"); + pr_err("cannot start watchdog timer\n"); goto exit_miscdev; } @@ -720,8 +716,7 @@ static int __init watchdog_init(int sioaddr) if (nowayout) __module_get(THIS_MODULE); - printk(KERN_INFO DRVNAME - ": watchdog started with initial timeout of %u sec\n", + pr_info("watchdog started with initial timeout of %u sec\n", start_withtimeout); } @@ -746,7 +741,7 @@ static int __init f71808e_find(int sioaddr) devid = superio_inw(sioaddr, SIO_REG_MANID); if (devid != SIO_FINTEK_ID) { - pr_debug(DRVNAME ": Not a Fintek device\n"); + pr_debug("Not a Fintek device\n"); err = -ENODEV; goto exit; } @@ -774,13 +769,13 @@ static int __init f71808e_find(int sioaddr) err = -ENODEV; goto exit; default: - printk(KERN_INFO DRVNAME ": Unrecognized Fintek device: %04x\n", - (unsigned int)devid); + pr_info("Unrecognized Fintek device: %04x\n", + (unsigned int)devid); err = -ENODEV; goto exit; } - printk(KERN_INFO DRVNAME ": Found %s watchdog chip, revision %d\n", + pr_info("Found %s watchdog chip, revision %d\n", f71808e_names[watchdog.type], (int)superio_inb(sioaddr, SIO_REG_DEVREV)); exit: @@ -808,8 +803,7 @@ static int __init f71808e_init(void) static void __exit f71808e_exit(void) { if (watchdog_is_running()) { - printk(KERN_WARNING DRVNAME - ": Watchdog timer still running, stopping it\n"); + pr_warn("Watchdog timer still running, stopping it\n"); watchdog_stop(); } misc_deregister(&watchdog_miscdev); |