diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 22:03:26 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 22:03:26 +0200 |
commit | 750f77064a290beb162352077b52c61b04bcae0e (patch) | |
tree | 736a8dd043dc4cda298762a80e7c1fbf1bb87742 /drivers/watchdog/mixcomwd.c | |
parent | Merge tag 'dm-3.4-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/a... (diff) | |
parent | watchdog: txx9wdt: fix timeout (diff) | |
download | linux-750f77064a290beb162352077b52c61b04bcae0e.tar.xz linux-750f77064a290beb162352077b52c61b04bcae0e.zip |
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/mixcomwd.c')
-rw-r--r-- | drivers/watchdog/mixcomwd.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/watchdog/mixcomwd.c b/drivers/watchdog/mixcomwd.c index bc820d16699a..37e4b52dbce9 100644 --- a/drivers/watchdog/mixcomwd.c +++ b/drivers/watchdog/mixcomwd.c @@ -39,9 +39,10 @@ * */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #define VERSION "0.6" #define WATCHDOG_NAME "mixcomwd" -#define PFX WATCHDOG_NAME ": " #include <linux/module.h> #include <linux/moduleparam.h> @@ -107,8 +108,8 @@ static int mixcomwd_timer_alive; static DEFINE_TIMER(mixcomwd_timer, mixcomwd_timerfun, 0, 0); static char expect_close; -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) ")"); @@ -156,15 +157,13 @@ static int mixcomwd_release(struct inode *inode, struct file *file) { if (expect_close == 42) { if (mixcomwd_timer_alive) { - printk(KERN_ERR PFX - "release called while internal timer alive"); + pr_err("release called while internal timer alive\n"); return -EBUSY; } mixcomwd_timer_alive = 1; mod_timer(&mixcomwd_timer, jiffies + 5 * HZ); } else - printk(KERN_CRIT PFX - "WDT device closed unexpectedly. WDT will not stop!\n"); + pr_crit("WDT device closed unexpectedly. WDT will not stop!\n"); clear_bit(0, &mixcomwd_opened); expect_close = 0; @@ -274,22 +273,19 @@ static int __init mixcomwd_init(void) } if (!found) { - printk(KERN_ERR PFX - "No card detected, or port not available.\n"); + pr_err("No card detected, or port not available\n"); return -ENODEV; } ret = misc_register(&mixcomwd_miscdev); if (ret) { - printk(KERN_ERR PFX - "cannot register miscdev on minor=%d (err=%d)\n", - WATCHDOG_MINOR, ret); + pr_err("cannot register miscdev on minor=%d (err=%d)\n", + WATCHDOG_MINOR, ret); goto error_misc_register_watchdog; } - printk(KERN_INFO - "MixCOM watchdog driver v%s, watchdog port at 0x%3x\n", - VERSION, watchdog_port); + pr_info("MixCOM watchdog driver v%s, watchdog port at 0x%3x\n", + VERSION, watchdog_port); return 0; @@ -303,8 +299,7 @@ static void __exit mixcomwd_exit(void) { if (!nowayout) { if (mixcomwd_timer_alive) { - printk(KERN_WARNING PFX "I quit now, hardware will" - " probably reboot!\n"); + pr_warn("I quit now, hardware will probably reboot!\n"); del_timer_sync(&mixcomwd_timer); mixcomwd_timer_alive = 0; } |