diff options
Diffstat (limited to 'drivers/watchdog/gef_wdt.c')
-rw-r--r-- | drivers/watchdog/gef_wdt.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c index b146082bd85a..17f4cae770c6 100644 --- a/drivers/watchdog/gef_wdt.c +++ b/drivers/watchdog/gef_wdt.c | |||
@@ -24,6 +24,8 @@ | |||
24 | * capabilities) a kernel-based watchdog. | 24 | * capabilities) a kernel-based watchdog. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
28 | |||
27 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
28 | #include <linux/compiler.h> | 30 | #include <linux/compiler.h> |
29 | #include <linux/init.h> | 31 | #include <linux/init.h> |
@@ -68,8 +70,8 @@ static unsigned int bus_clk; | |||
68 | static char expect_close; | 70 | static char expect_close; |
69 | static DEFINE_SPINLOCK(gef_wdt_spinlock); | 71 | static DEFINE_SPINLOCK(gef_wdt_spinlock); |
70 | 72 | ||
71 | static int nowayout = WATCHDOG_NOWAYOUT; | 73 | static bool nowayout = WATCHDOG_NOWAYOUT; |
72 | module_param(nowayout, int, 0); | 74 | module_param(nowayout, bool, 0); |
73 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" | 75 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" |
74 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 76 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
75 | 77 | ||
@@ -110,7 +112,7 @@ static void gef_wdt_handler_enable(void) | |||
110 | if (gef_wdt_toggle_wdc(GEF_WDC_ENABLED_FALSE, | 112 | if (gef_wdt_toggle_wdc(GEF_WDC_ENABLED_FALSE, |
111 | GEF_WDC_ENABLE_SHIFT)) { | 113 | GEF_WDC_ENABLE_SHIFT)) { |
112 | gef_wdt_service(); | 114 | gef_wdt_service(); |
113 | printk(KERN_NOTICE "gef_wdt: watchdog activated\n"); | 115 | pr_notice("watchdog activated\n"); |
114 | } | 116 | } |
115 | } | 117 | } |
116 | 118 | ||
@@ -118,7 +120,7 @@ static void gef_wdt_handler_disable(void) | |||
118 | { | 120 | { |
119 | if (gef_wdt_toggle_wdc(GEF_WDC_ENABLED_TRUE, | 121 | if (gef_wdt_toggle_wdc(GEF_WDC_ENABLED_TRUE, |
120 | GEF_WDC_ENABLE_SHIFT)) | 122 | GEF_WDC_ENABLE_SHIFT)) |
121 | printk(KERN_NOTICE "gef_wdt: watchdog deactivated\n"); | 123 | pr_notice("watchdog deactivated\n"); |
122 | } | 124 | } |
123 | 125 | ||
124 | static void gef_wdt_set_timeout(unsigned int timeout) | 126 | static void gef_wdt_set_timeout(unsigned int timeout) |
@@ -234,8 +236,7 @@ static int gef_wdt_release(struct inode *inode, struct file *file) | |||
234 | if (expect_close == 42) | 236 | if (expect_close == 42) |
235 | gef_wdt_handler_disable(); | 237 | gef_wdt_handler_disable(); |
236 | else { | 238 | else { |
237 | printk(KERN_CRIT | 239 | pr_crit("unexpected close, not stopping timer!\n"); |
238 | "gef_wdt: unexpected close, not stopping timer!\n"); | ||
239 | gef_wdt_service(); | 240 | gef_wdt_service(); |
240 | } | 241 | } |
241 | expect_close = 0; | 242 | expect_close = 0; |
@@ -313,7 +314,7 @@ static struct platform_driver gef_wdt_driver = { | |||
313 | 314 | ||
314 | static int __init gef_wdt_init(void) | 315 | static int __init gef_wdt_init(void) |
315 | { | 316 | { |
316 | printk(KERN_INFO "GE watchdog driver\n"); | 317 | pr_info("GE watchdog driver\n"); |
317 | return platform_driver_register(&gef_wdt_driver); | 318 | return platform_driver_register(&gef_wdt_driver); |
318 | } | 319 | } |
319 | 320 | ||