diff options
Diffstat (limited to 'drivers/watchdog/booke_wdt.c')
-rw-r--r-- | drivers/watchdog/booke_wdt.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 7c0fdfca2646..3990d82f935c 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
@@ -12,6 +12,8 @@ | |||
12 | * option) any later version. | 12 | * option) any later version. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
16 | |||
15 | #include <linux/module.h> | 17 | #include <linux/module.h> |
16 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
17 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
@@ -225,8 +227,8 @@ static int booke_wdt_open(struct inode *inode, struct file *file) | |||
225 | if (booke_wdt_enabled == 0) { | 227 | if (booke_wdt_enabled == 0) { |
226 | booke_wdt_enabled = 1; | 228 | booke_wdt_enabled = 1; |
227 | on_each_cpu(__booke_wdt_enable, NULL, 0); | 229 | on_each_cpu(__booke_wdt_enable, NULL, 0); |
228 | pr_debug("booke_wdt: watchdog enabled (timeout = %llu sec)\n", | 230 | pr_debug("watchdog enabled (timeout = %llu sec)\n", |
229 | period_to_sec(booke_wdt_period)); | 231 | period_to_sec(booke_wdt_period)); |
230 | } | 232 | } |
231 | spin_unlock(&booke_wdt_lock); | 233 | spin_unlock(&booke_wdt_lock); |
232 | 234 | ||
@@ -243,7 +245,7 @@ static int booke_wdt_release(struct inode *inode, struct file *file) | |||
243 | */ | 245 | */ |
244 | on_each_cpu(__booke_wdt_disable, NULL, 0); | 246 | on_each_cpu(__booke_wdt_disable, NULL, 0); |
245 | booke_wdt_enabled = 0; | 247 | booke_wdt_enabled = 0; |
246 | pr_debug("booke_wdt: watchdog disabled\n"); | 248 | pr_debug("watchdog disabled\n"); |
247 | #endif | 249 | #endif |
248 | 250 | ||
249 | clear_bit(0, &wdt_is_active); | 251 | clear_bit(0, &wdt_is_active); |
@@ -275,19 +277,19 @@ static int __init booke_wdt_init(void) | |||
275 | { | 277 | { |
276 | int ret = 0; | 278 | int ret = 0; |
277 | 279 | ||
278 | pr_info("booke_wdt: powerpc book-e watchdog driver loaded\n"); | 280 | pr_info("powerpc book-e watchdog driver loaded\n"); |
279 | ident.firmware_version = cur_cpu_spec->pvr_value; | 281 | ident.firmware_version = cur_cpu_spec->pvr_value; |
280 | 282 | ||
281 | ret = misc_register(&booke_wdt_miscdev); | 283 | ret = misc_register(&booke_wdt_miscdev); |
282 | if (ret) { | 284 | if (ret) { |
283 | pr_err("booke_wdt: cannot register device (minor=%u, ret=%i)\n", | 285 | pr_err("cannot register device (minor=%u, ret=%i)\n", |
284 | WATCHDOG_MINOR, ret); | 286 | WATCHDOG_MINOR, ret); |
285 | return ret; | 287 | return ret; |
286 | } | 288 | } |
287 | 289 | ||
288 | spin_lock(&booke_wdt_lock); | 290 | spin_lock(&booke_wdt_lock); |
289 | if (booke_wdt_enabled == 1) { | 291 | if (booke_wdt_enabled == 1) { |
290 | pr_info("booke_wdt: watchdog enabled (timeout = %llu sec)\n", | 292 | pr_info("watchdog enabled (timeout = %llu sec)\n", |
291 | period_to_sec(booke_wdt_period)); | 293 | period_to_sec(booke_wdt_period)); |
292 | on_each_cpu(__booke_wdt_enable, NULL, 0); | 294 | on_each_cpu(__booke_wdt_enable, NULL, 0); |
293 | } | 295 | } |