aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/xen_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/xen_wdt.c')
-rw-r--r--drivers/watchdog/xen_wdt.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/watchdog/xen_wdt.c b/drivers/watchdog/xen_wdt.c
index 49bd9d395562..79aa7f96c246 100644
--- a/drivers/watchdog/xen_wdt.c
+++ b/drivers/watchdog/xen_wdt.c
@@ -9,9 +9,10 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
13
12#define DRV_NAME "wdt" 14#define DRV_NAME "wdt"
13#define DRV_VERSION "0.01" 15#define DRV_VERSION "0.01"
14#define PFX DRV_NAME ": "
15 16
16#include <linux/bug.h> 17#include <linux/bug.h>
17#include <linux/errno.h> 18#include <linux/errno.h>
@@ -134,8 +135,7 @@ static int xen_wdt_release(struct inode *inode, struct file *file)
134 if (expect_release) 135 if (expect_release)
135 xen_wdt_stop(); 136 xen_wdt_stop();
136 else { 137 else {
137 printk(KERN_CRIT PFX 138 pr_crit("unexpected close, not stopping watchdog!\n");
138 "unexpected close, not stopping watchdog!\n");
139 xen_wdt_kick(); 139 xen_wdt_kick();
140 } 140 }
141 is_active = false; 141 is_active = false;
@@ -251,30 +251,27 @@ static int __devinit xen_wdt_probe(struct platform_device *dev)
251 case -EINVAL: 251 case -EINVAL:
252 if (!timeout) { 252 if (!timeout) {
253 timeout = WATCHDOG_TIMEOUT; 253 timeout = WATCHDOG_TIMEOUT;
254 printk(KERN_INFO PFX 254 pr_info("timeout value invalid, using %d\n", timeout);
255 "timeout value invalid, using %d\n", timeout);
256 } 255 }
257 256
258 ret = misc_register(&xen_wdt_miscdev); 257 ret = misc_register(&xen_wdt_miscdev);
259 if (ret) { 258 if (ret) {
260 printk(KERN_ERR PFX 259 pr_err("cannot register miscdev on minor=%d (%d)\n",
261 "cannot register miscdev on minor=%d (%d)\n",
262 WATCHDOG_MINOR, ret); 260 WATCHDOG_MINOR, ret);
263 break; 261 break;
264 } 262 }
265 263
266 printk(KERN_INFO PFX 264 pr_info("initialized (timeout=%ds, nowayout=%d)\n",
267 "initialized (timeout=%ds, nowayout=%d)\n", 265 timeout, nowayout);
268 timeout, nowayout);
269 break; 266 break;
270 267
271 case -ENOSYS: 268 case -ENOSYS:
272 printk(KERN_INFO PFX "not supported\n"); 269 pr_info("not supported\n");
273 ret = -ENODEV; 270 ret = -ENODEV;
274 break; 271 break;
275 272
276 default: 273 default:
277 printk(KERN_INFO PFX "bogus return value %d\n", ret); 274 pr_info("bogus return value %d\n", ret);
278 break; 275 break;
279 } 276 }
280 277
@@ -326,7 +323,7 @@ static int __init xen_wdt_init_module(void)
326 if (!xen_domain()) 323 if (!xen_domain())
327 return -ENODEV; 324 return -ENODEV;
328 325
329 printk(KERN_INFO PFX "Xen WatchDog Timer Driver v%s\n", DRV_VERSION); 326 pr_info("Xen WatchDog Timer Driver v%s\n", DRV_VERSION);
330 327
331 err = platform_driver_register(&xen_wdt_driver); 328 err = platform_driver_register(&xen_wdt_driver);
332 if (err) 329 if (err)
@@ -346,7 +343,7 @@ static void __exit xen_wdt_cleanup_module(void)
346{ 343{
347 platform_device_unregister(platform_device); 344 platform_device_unregister(platform_device);
348 platform_driver_unregister(&xen_wdt_driver); 345 platform_driver_unregister(&xen_wdt_driver);
349 printk(KERN_INFO PFX "module unloaded\n"); 346 pr_info("module unloaded\n");
350} 347}
351 348
352module_init(xen_wdt_init_module); 349module_init(xen_wdt_init_module);