aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/acquirewdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/acquirewdt.c')
-rw-r--r--drivers/watchdog/acquirewdt.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/watchdog/acquirewdt.c b/drivers/watchdog/acquirewdt.c
index b6a2b58cbe64..8947ccd71efc 100644
--- a/drivers/watchdog/acquirewdt.c
+++ b/drivers/watchdog/acquirewdt.c
@@ -52,6 +52,8 @@
52 * Includes, defines, variables, module parameters, ... 52 * Includes, defines, variables, module parameters, ...
53 */ 53 */
54 54
55#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
56
55/* Includes */ 57/* Includes */
56#include <linux/module.h> /* For module specific items */ 58#include <linux/module.h> /* For module specific items */
57#include <linux/moduleparam.h> /* For new moduleparam's */ 59#include <linux/moduleparam.h> /* For new moduleparam's */
@@ -70,7 +72,6 @@
70 72
71/* Module information */ 73/* Module information */
72#define DRV_NAME "acquirewdt" 74#define DRV_NAME "acquirewdt"
73#define PFX DRV_NAME ": "
74#define WATCHDOG_NAME "Acquire WDT" 75#define WATCHDOG_NAME "Acquire WDT"
75/* There is no way to see what the correct time-out period is */ 76/* There is no way to see what the correct time-out period is */
76#define WATCHDOG_HEARTBEAT 0 77#define WATCHDOG_HEARTBEAT 0
@@ -208,8 +209,7 @@ static int acq_close(struct inode *inode, struct file *file)
208 if (expect_close == 42) { 209 if (expect_close == 42) {
209 acq_stop(); 210 acq_stop();
210 } else { 211 } else {
211 printk(KERN_CRIT PFX 212 pr_crit("Unexpected close, not stopping watchdog!\n");
212 "Unexpected close, not stopping watchdog!\n");
213 acq_keepalive(); 213 acq_keepalive();
214 } 214 }
215 clear_bit(0, &acq_is_open); 215 clear_bit(0, &acq_is_open);
@@ -246,27 +246,24 @@ static int __devinit acq_probe(struct platform_device *dev)
246 246
247 if (wdt_stop != wdt_start) { 247 if (wdt_stop != wdt_start) {
248 if (!request_region(wdt_stop, 1, WATCHDOG_NAME)) { 248 if (!request_region(wdt_stop, 1, WATCHDOG_NAME)) {
249 printk(KERN_ERR PFX 249 pr_err("I/O address 0x%04x already in use\n", wdt_stop);
250 "I/O address 0x%04x already in use\n", wdt_stop);
251 ret = -EIO; 250 ret = -EIO;
252 goto out; 251 goto out;
253 } 252 }
254 } 253 }
255 254
256 if (!request_region(wdt_start, 1, WATCHDOG_NAME)) { 255 if (!request_region(wdt_start, 1, WATCHDOG_NAME)) {
257 printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", 256 pr_err("I/O address 0x%04x already in use\n", wdt_start);
258 wdt_start);
259 ret = -EIO; 257 ret = -EIO;
260 goto unreg_stop; 258 goto unreg_stop;
261 } 259 }
262 ret = misc_register(&acq_miscdev); 260 ret = misc_register(&acq_miscdev);
263 if (ret != 0) { 261 if (ret != 0) {
264 printk(KERN_ERR PFX 262 pr_err("cannot register miscdev on minor=%d (err=%d)\n",
265 "cannot register miscdev on minor=%d (err=%d)\n", 263 WATCHDOG_MINOR, ret);
266 WATCHDOG_MINOR, ret);
267 goto unreg_regions; 264 goto unreg_regions;
268 } 265 }
269 printk(KERN_INFO PFX "initialized. (nowayout=%d)\n", nowayout); 266 pr_info("initialized. (nowayout=%d)\n", nowayout);
270 267
271 return 0; 268 return 0;
272unreg_regions: 269unreg_regions:
@@ -308,8 +305,7 @@ static int __init acq_init(void)
308{ 305{
309 int err; 306 int err;
310 307
311 printk(KERN_INFO 308 pr_info("WDT driver for Acquire single board computer initialising\n");
312 "WDT driver for Acquire single board computer initialising.\n");
313 309
314 err = platform_driver_register(&acquirewdt_driver); 310 err = platform_driver_register(&acquirewdt_driver);
315 if (err) 311 if (err)
@@ -332,7 +328,7 @@ static void __exit acq_exit(void)
332{ 328{
333 platform_device_unregister(acq_platform_device); 329 platform_device_unregister(acq_platform_device);
334 platform_driver_unregister(&acquirewdt_driver); 330 platform_driver_unregister(&acquirewdt_driver);
335 printk(KERN_INFO PFX "Watchdog Module Unloaded.\n"); 331 pr_info("Watchdog Module Unloaded\n");
336} 332}
337 333
338module_init(acq_init); 334module_init(acq_init);