diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 13:03:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 13:03:26 -0700 |
commit | 750f77064a290beb162352077b52c61b04bcae0e (patch) | |
tree | 736a8dd043dc4cda298762a80e7c1fbf1bb87742 /drivers/watchdog/sp5100_tco.c | |
parent | 89e5d6f0d979f6e7dc2bbb1ebd9e239217e2e952 (diff) | |
parent | b92c803ec61de59e6e4ab9b2748d8e633cec3f08 (diff) | |
download | op-kernel-dev-750f77064a290beb162352077b52c61b04bcae0e.zip op-kernel-dev-750f77064a290beb162352077b52c61b04bcae0e.tar.gz |
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/sp5100_tco.c')
-rw-r--r-- | drivers/watchdog/sp5100_tco.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c index 87e0527..59108e4 100644 --- a/drivers/watchdog/sp5100_tco.c +++ b/drivers/watchdog/sp5100_tco.c @@ -20,6 +20,8 @@ * Includes, defines, variables, module parameters, ... */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h> @@ -39,7 +41,6 @@ #define TCO_VERSION "0.01" #define TCO_MODULE_NAME "SP5100 TCO timer" #define TCO_DRIVER_NAME TCO_MODULE_NAME ", v" TCO_VERSION -#define PFX TCO_MODULE_NAME ": " /* internal variables */ static u32 tcobase_phys; @@ -61,8 +62,8 @@ module_param(heartbeat, int, 0); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); -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) ")"); @@ -143,8 +144,7 @@ static int sp5100_tco_release(struct inode *inode, struct file *file) if (tco_expect_close == 42) { tco_timer_stop(); } else { - printk(KERN_CRIT PFX - "Unexpected close, not stopping watchdog!\n"); + pr_crit("Unexpected close, not stopping watchdog!\n"); tco_timer_keepalive(); } clear_bit(0, &timer_alive); @@ -290,8 +290,7 @@ static unsigned char __devinit sp5100_tco_setupdevice(void) /* Request the IO ports used by this driver */ pm_iobase = SP5100_IO_PM_INDEX_REG; if (!request_region(pm_iobase, SP5100_PM_IOPORTS_SIZE, "SP5100 TCO")) { - printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", - pm_iobase); + pr_err("I/O address 0x%04x already in use\n", pm_iobase); goto exit; } @@ -308,15 +307,14 @@ static unsigned char __devinit sp5100_tco_setupdevice(void) if (!request_mem_region_exclusive(val, SP5100_WDT_MEM_MAP_SIZE, "SP5100 TCO")) { - printk(KERN_ERR PFX "mmio address 0x%04x already in use\n", - val); + pr_err("mmio address 0x%04x already in use\n", val); goto unreg_region; } tcobase_phys = val; tcobase = ioremap(val, SP5100_WDT_MEM_MAP_SIZE); if (tcobase == 0) { - printk(KERN_ERR PFX "failed to get tcobase address\n"); + pr_err("failed to get tcobase address\n"); goto unreg_mem_region; } @@ -375,9 +373,9 @@ static int __devinit sp5100_tco_init(struct platform_device *dev) return -ENODEV; /* Check to see if last reboot was due to watchdog timeout */ - printk(KERN_INFO PFX "Watchdog reboot %sdetected.\n", - readl(SP5100_WDT_CONTROL(tcobase)) & SP5100_PM_WATCHDOG_FIRED ? - "" : "not "); + pr_info("Watchdog reboot %sdetected\n", + readl(SP5100_WDT_CONTROL(tcobase)) & SP5100_PM_WATCHDOG_FIRED ? + "" : "not "); /* Clear out the old status */ val = readl(SP5100_WDT_CONTROL(tcobase)); @@ -395,16 +393,14 @@ static int __devinit sp5100_tco_init(struct platform_device *dev) ret = misc_register(&sp5100_tco_miscdev); if (ret != 0) { - printk(KERN_ERR PFX "cannot register miscdev on minor=" - "%d (err=%d)\n", + pr_err("cannot register miscdev on minor=%d (err=%d)\n", WATCHDOG_MINOR, ret); goto exit; } clear_bit(0, &timer_alive); - printk(KERN_INFO PFX "initialized (0x%p). heartbeat=%d sec" - " (nowayout=%d)\n", + pr_info("initialized (0x%p). heartbeat=%d sec (nowayout=%d)\n", tcobase, heartbeat, nowayout); return 0; @@ -455,8 +451,7 @@ static int __init sp5100_tco_init_module(void) { int err; - printk(KERN_INFO PFX "SP5100 TCO WatchDog Timer Driver v%s\n", - TCO_VERSION); + pr_info("SP5100 TCO WatchDog Timer Driver v%s\n", TCO_VERSION); err = platform_driver_register(&sp5100_tco_driver); if (err) @@ -480,7 +475,7 @@ static void __exit sp5100_tco_cleanup_module(void) { platform_device_unregister(sp5100_tco_platform_device); platform_driver_unregister(&sp5100_tco_driver); - printk(KERN_INFO PFX "SP5100 TCO Watchdog Module Unloaded.\n"); + pr_info("SP5100 TCO Watchdog Module Unloaded\n"); } module_init(sp5100_tco_init_module); |