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/hpwdt.c | |
parent | 89e5d6f0d979f6e7dc2bbb1ebd9e239217e2e952 (diff) | |
parent | b92c803ec61de59e6e4ab9b2748d8e633cec3f08 (diff) |
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/hpwdt.c')
-rw-r--r-- | drivers/watchdog/hpwdt.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 3c166d3f4e5..cbc7ceef278 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -13,6 +13,8 @@ * */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/device.h> #include <linux/fs.h> #include <linux/init.h> @@ -45,7 +47,7 @@ static unsigned int soft_margin = DEFAULT_MARGIN; /* in seconds */ static unsigned int reload; /* the computed soft_margin */ -static int nowayout = WATCHDOG_NOWAYOUT; +static bool nowayout = WATCHDOG_NOWAYOUT; static char expect_release; static unsigned long hpwdt_is_open; @@ -235,8 +237,7 @@ static int __devinit cru_detect(unsigned long map_entry, asminline_call(&cmn_regs, bios32_entrypoint); if (cmn_regs.u1.ral != 0) { - printk(KERN_WARNING - "hpwdt: Call succeeded but with an error: 0x%x\n", + pr_warn("Call succeeded but with an error: 0x%x\n", cmn_regs.u1.ral); } else { physical_bios_base = cmn_regs.u2.rebx; @@ -256,14 +257,10 @@ static int __devinit cru_detect(unsigned long map_entry, } } - printk(KERN_DEBUG "hpwdt: CRU Base Address: 0x%lx\n", - physical_bios_base); - printk(KERN_DEBUG "hpwdt: CRU Offset Address: 0x%lx\n", - physical_bios_offset); - printk(KERN_DEBUG "hpwdt: CRU Length: 0x%lx\n", - cru_length); - printk(KERN_DEBUG "hpwdt: CRU Mapped Address: %p\n", - &cru_rom_addr); + pr_debug("CRU Base Address: 0x%lx\n", physical_bios_base); + pr_debug("CRU Offset Address: 0x%lx\n", physical_bios_offset); + pr_debug("CRU Length: 0x%lx\n", cru_length); + pr_debug("CRU Mapped Address: %p\n", &cru_rom_addr); } iounmap(bios32_map); return retval; @@ -458,16 +455,13 @@ static void hpwdt_ping(void) static int hpwdt_change_timer(int new_margin) { if (new_margin < 1 || new_margin > HPWDT_MAX_TIMER) { - printk(KERN_WARNING - "hpwdt: New value passed in is invalid: %d seconds.\n", + pr_warn("New value passed in is invalid: %d seconds\n", new_margin); return -EINVAL; } soft_margin = new_margin; - printk(KERN_DEBUG - "hpwdt: New timer passed in is %d seconds.\n", - new_margin); + pr_debug("New timer passed in is %d seconds\n", new_margin); reload = SECS_TO_TICKS(soft_margin); return 0; @@ -535,8 +529,7 @@ static int hpwdt_release(struct inode *inode, struct file *file) if (expect_release == 42) { hpwdt_stop(); } else { - printk(KERN_CRIT - "hpwdt: Unexpected close, not stopping watchdog!\n"); + pr_crit("Unexpected close, not stopping watchdog!\n"); hpwdt_ping(); } @@ -881,7 +874,7 @@ MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); module_param(soft_margin, int, 0); MODULE_PARM_DESC(soft_margin, "Watchdog timeout in seconds"); -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) ")"); |