diff options
Diffstat (limited to 'drivers/watchdog/ibmasr.c')
-rw-r--r-- | drivers/watchdog/ibmasr.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/watchdog/ibmasr.c b/drivers/watchdog/ibmasr.c index c7481ad51629..6cd496915eb0 100644 --- a/drivers/watchdog/ibmasr.c +++ b/drivers/watchdog/ibmasr.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * of the GNU Public License, incorporated herein by reference. | 10 | * of the GNU Public License, incorporated herein by reference. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
14 | |||
13 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
14 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 17 | #include <linux/module.h> |
@@ -31,8 +33,6 @@ enum { | |||
31 | ASMTYPE_SPRUCE, | 33 | ASMTYPE_SPRUCE, |
32 | }; | 34 | }; |
33 | 35 | ||
34 | #define PFX "ibmasr: " | ||
35 | |||
36 | #define TOPAZ_ASR_REG_OFFSET 4 | 36 | #define TOPAZ_ASR_REG_OFFSET 4 |
37 | #define TOPAZ_ASR_TOGGLE 0x40 | 37 | #define TOPAZ_ASR_TOGGLE 0x40 |
38 | #define TOPAZ_ASR_DISABLE 0x80 | 38 | #define TOPAZ_ASR_DISABLE 0x80 |
@@ -234,12 +234,11 @@ static int __init asr_get_base_address(void) | |||
234 | } | 234 | } |
235 | 235 | ||
236 | if (!request_region(asr_base, asr_length, "ibmasr")) { | 236 | if (!request_region(asr_base, asr_length, "ibmasr")) { |
237 | printk(KERN_ERR PFX "address %#x already in use\n", | 237 | pr_err("address %#x already in use\n", asr_base); |
238 | asr_base); | ||
239 | return -EBUSY; | 238 | return -EBUSY; |
240 | } | 239 | } |
241 | 240 | ||
242 | printk(KERN_INFO PFX "found %sASR @ addr %#x\n", type, asr_base); | 241 | pr_info("found %sASR @ addr %#x\n", type, asr_base); |
243 | 242 | ||
244 | return 0; | 243 | return 0; |
245 | } | 244 | } |
@@ -332,8 +331,7 @@ static int asr_release(struct inode *inode, struct file *file) | |||
332 | if (asr_expect_close == 42) | 331 | if (asr_expect_close == 42) |
333 | asr_disable(); | 332 | asr_disable(); |
334 | else { | 333 | else { |
335 | printk(KERN_CRIT PFX | 334 | pr_crit("unexpected close, not stopping watchdog!\n"); |
336 | "unexpected close, not stopping watchdog!\n"); | ||
337 | asr_toggle(); | 335 | asr_toggle(); |
338 | } | 336 | } |
339 | clear_bit(0, &asr_is_open); | 337 | clear_bit(0, &asr_is_open); |
@@ -393,7 +391,7 @@ static int __init ibmasr_init(void) | |||
393 | rc = misc_register(&asr_miscdev); | 391 | rc = misc_register(&asr_miscdev); |
394 | if (rc < 0) { | 392 | if (rc < 0) { |
395 | release_region(asr_base, asr_length); | 393 | release_region(asr_base, asr_length); |
396 | printk(KERN_ERR PFX "failed to register misc device\n"); | 394 | pr_err("failed to register misc device\n"); |
397 | return rc; | 395 | return rc; |
398 | } | 396 | } |
399 | 397 | ||