diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 20:03:26 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 20:03:26 (GMT) |
commit | 750f77064a290beb162352077b52c61b04bcae0e (patch) | |
tree | 736a8dd043dc4cda298762a80e7c1fbf1bb87742 /drivers/watchdog/it87_wdt.c | |
parent | 89e5d6f0d979f6e7dc2bbb1ebd9e239217e2e952 (diff) | |
parent | b92c803ec61de59e6e4ab9b2748d8e633cec3f08 (diff) | |
download | linux-750f77064a290beb162352077b52c61b04bcae0e.tar.xz |
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck:
- Removal of the Documentation/watchdog/00-INDEX file
- Fix boot status reporting for imx2_wdt
- clean-up sp805_wdt, pnx4008_wdt and mpcore_wdt
- convert printk in watchdog drivers to pr_ functions
- change nowayout module parameter to bool for every watchdog device
- conversion of jz4740_wdt, pnx4008_wdt, max63xx_wdt, softdog,
ep93xx_wdt, coh901327 and txx9wdt to new watchdog API
- Add support for the WDIOC_GETTIMELEFT ioctl call to the new watchdog
API
- Change the new watchdog API so that the driver updates the timeout
value
- two fixes for the xen_wdt driver
Fix up conflicts in ep93xx driver due to the same patches being merged
through separate branches.
* git://www.linux-watchdog.org/linux-watchdog: (33 commits)
watchdog: txx9wdt: fix timeout
watchdog: Convert txx9wdt driver to watchdog framework
watchdog: coh901327_wdt.c: fix timeout
watchdog: coh901327: convert to use watchdog core
watchdog: Add support for WDIOC_GETTIMELEFT IOCTL in watchdog core
watchdog: ep93xx_wdt: timeout is an unsigned int value.
watchdog: ep93xx_wdt: Fix timeout after conversion to watchdog core
watchdog: Convert ep93xx driver to watchdog core
watchdog: sp805: Use devm routines
watchdog: sp805: replace readl/writel with lighter _relaxed variants
watchdog: sp805: Fix documentation style comment
watchdog: mpcore_wdt: Allow platform_get_irq() to fail
watchdog: mpcore_wdt: Use devm routines
watchdog: mpcore_wdt: Rename dev to pdev for pointing to struct platform_device
watchdog: xen: don't clear is_active when xen_wdt_stop() failed
watchdog: xen: don't unconditionally enable the watchdog during resume
watchdog: fix compiler error for missing parenthesis
watchdog: ep93xx_wdt.c: fix platform probe
watchdog: ep93xx: Convert the watchdog driver into a platform device.
watchdog: fix set_timeout operations
...
Diffstat (limited to 'drivers/watchdog/it87_wdt.c')
-rw-r--r-- | drivers/watchdog/it87_wdt.c | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/drivers/watchdog/it87_wdt.c b/drivers/watchdog/it87_wdt.c index a2d9a12..405ae7b 100644 --- a/drivers/watchdog/it87_wdt.c +++ b/drivers/watchdog/it87_wdt.c @@ -29,6 +29,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h> @@ -47,7 +49,6 @@ #define WATCHDOG_VERSION "1.14" #define WATCHDOG_NAME "IT87 WDT" -#define PFX WATCHDOG_NAME ": " #define DRIVER_VERSION WATCHDOG_NAME " driver, v" WATCHDOG_VERSION "\n" #define WD_MAGIC 'V' @@ -142,7 +143,7 @@ static int nogameport = DEFAULT_NOGAMEPORT; static int exclusive = DEFAULT_EXCLUSIVE; static int timeout = DEFAULT_TIMEOUT; static int testmode = DEFAULT_TESTMODE; -static int nowayout = DEFAULT_NOWAYOUT; +static bool nowayout = DEFAULT_NOWAYOUT; module_param(nogameport, int, 0); MODULE_PARM_DESC(nogameport, "Forbid the activation of game port, default=" @@ -156,7 +157,7 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds, default=" module_param(testmode, int, 0); MODULE_PARM_DESC(testmode, "Watchdog test mode (1 = no reboot), default=" __MODULE_STRING(DEFAULT_TESTMODE)); -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)); @@ -428,8 +429,7 @@ static int wdt_release(struct inode *inode, struct file *file) clear_bit(WDTS_TIMER_RUN, &wdt_status); } else { wdt_keepalive(); - printk(KERN_CRIT PFX - "unexpected close, not stopping watchdog!\n"); + pr_crit("unexpected close, not stopping watchdog!\n"); } } clear_bit(WDTS_DEV_OPEN, &wdt_status); @@ -621,16 +621,14 @@ static int __init it87_wdt_init(void) try_gameport = 0; break; case IT8705_ID: - printk(KERN_ERR PFX - "Unsupported Chip found, Chip %04x Revision %02x\n", + pr_err("Unsupported Chip found, Chip %04x Revision %02x\n", chip_type, chip_rev); return -ENODEV; case NO_DEV_ID: - printk(KERN_ERR PFX "no device\n"); + pr_err("no device\n"); return -ENODEV; default: - printk(KERN_ERR PFX - "Unknown Chip found, Chip %04x Revision %04x\n", + pr_err("Unknown Chip found, Chip %04x Revision %04x\n", chip_type, chip_rev); return -ENODEV; } @@ -663,13 +661,11 @@ static int __init it87_wdt_init(void) if (!test_bit(WDTS_USE_GP, &wdt_status)) { if (!request_region(CIR_BASE, 8, WATCHDOG_NAME)) { if (gp_rreq_fail) - printk(KERN_ERR PFX - "I/O Address 0x%04x and 0x%04x" - " already in use\n", base, CIR_BASE); + pr_err("I/O Address 0x%04x and 0x%04x already in use\n", + base, CIR_BASE); else - printk(KERN_ERR PFX - "I/O Address 0x%04x already in use\n", - CIR_BASE); + pr_err("I/O Address 0x%04x already in use\n", + CIR_BASE); rc = -EIO; goto err_out; } @@ -688,9 +684,8 @@ static int __init it87_wdt_init(void) if (timeout < 1 || timeout > max_units * 60) { timeout = DEFAULT_TIMEOUT; - printk(KERN_WARNING PFX - "Timeout value out of range, use default %d sec\n", - DEFAULT_TIMEOUT); + pr_warn("Timeout value out of range, use default %d sec\n", + DEFAULT_TIMEOUT); } if (timeout > max_units) @@ -698,16 +693,14 @@ static int __init it87_wdt_init(void) rc = register_reboot_notifier(&wdt_notifier); if (rc) { - printk(KERN_ERR PFX - "Cannot register reboot notifier (err=%d)\n", rc); + pr_err("Cannot register reboot notifier (err=%d)\n", rc); goto err_out_region; } rc = misc_register(&wdt_miscdev); if (rc) { - printk(KERN_ERR PFX - "Cannot register miscdev on minor=%d (err=%d)\n", - wdt_miscdev.minor, rc); + pr_err("Cannot register miscdev on minor=%d (err=%d)\n", + wdt_miscdev.minor, rc); goto err_out_reboot; } @@ -722,9 +715,8 @@ static int __init it87_wdt_init(void) outb(0x09, CIR_IER(base)); } - printk(KERN_INFO PFX "Chip IT%04x revision %d initialized. " - "timeout=%d sec (nowayout=%d testmode=%d exclusive=%d " - "nogameport=%d)\n", chip_type, chip_rev, timeout, + pr_info("Chip IT%04x revision %d initialized. timeout=%d sec (nowayout=%d testmode=%d exclusive=%d nogameport=%d)\n", + chip_type, chip_rev, timeout, nowayout, testmode, exclusive, nogameport); superio_exit(); |