summaryrefslogtreecommitdiff
path: root/drivers/watchdog/pika_wdt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 20:03:26 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 20:03:26 (GMT)
commit750f77064a290beb162352077b52c61b04bcae0e (patch)
tree736a8dd043dc4cda298762a80e7c1fbf1bb87742 /drivers/watchdog/pika_wdt.c
parent89e5d6f0d979f6e7dc2bbb1ebd9e239217e2e952 (diff)
parentb92c803ec61de59e6e4ab9b2748d8e633cec3f08 (diff)
downloadlinux-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/pika_wdt.c')
-rw-r--r--drivers/watchdog/pika_wdt.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c
index 2d22e99..7d3d471 100644
--- a/drivers/watchdog/pika_wdt.c
+++ b/drivers/watchdog/pika_wdt.c
@@ -5,6 +5,8 @@
* Sean MacLennan <smaclennan@pikatech.com>
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/module.h>
@@ -23,7 +25,6 @@
#include <linux/of_platform.h>
#define DRV_NAME "PIKA-WDT"
-#define PFX DRV_NAME ": "
/* Hardware timeout in seconds */
#define WDT_HW_TIMEOUT 2
@@ -38,8 +39,8 @@ module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds. "
"(default = " __MODULE_STRING(WDT_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) ")");
@@ -90,7 +91,7 @@ static void pikawdt_ping(unsigned long data)
pikawdt_reset();
mod_timer(&pikawdt_private.timer, jiffies + WDT_TIMEOUT);
} else
- printk(KERN_CRIT PFX "I will reset your machine !\n");
+ pr_crit("I will reset your machine !\n");
}
@@ -228,14 +229,14 @@ static int __init pikawdt_init(void)
np = of_find_compatible_node(NULL, NULL, "pika,fpga");
if (np == NULL) {
- printk(KERN_ERR PFX "Unable to find fpga.\n");
+ pr_err("Unable to find fpga\n");
return -ENOENT;
}
pikawdt_private.fpga = of_iomap(np, 0);
of_node_put(np);
if (pikawdt_private.fpga == NULL) {
- printk(KERN_ERR PFX "Unable to map fpga.\n");
+ pr_err("Unable to map fpga\n");
return -ENOMEM;
}
@@ -244,7 +245,7 @@ static int __init pikawdt_init(void)
/* POST information is in the sd area. */
np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd");
if (np == NULL) {
- printk(KERN_ERR PFX "Unable to find fpga-sd.\n");
+ pr_err("Unable to find fpga-sd\n");
ret = -ENOENT;
goto out;
}
@@ -252,7 +253,7 @@ static int __init pikawdt_init(void)
fpga = of_iomap(np, 0);
of_node_put(np);
if (fpga == NULL) {
- printk(KERN_ERR PFX "Unable to map fpga-sd.\n");
+ pr_err("Unable to map fpga-sd\n");
ret = -ENOMEM;
goto out;
}
@@ -271,12 +272,12 @@ static int __init pikawdt_init(void)
ret = misc_register(&pikawdt_miscdev);
if (ret) {
- printk(KERN_ERR PFX "Unable to register miscdev.\n");
+ pr_err("Unable to register miscdev\n");
goto out;
}
- printk(KERN_INFO PFX "initialized. heartbeat=%d sec (nowayout=%d)\n",
- heartbeat, nowayout);
+ pr_info("initialized. heartbeat=%d sec (nowayout=%d)\n",
+ heartbeat, nowayout);
return 0;
out: