aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/pika_wdt.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-15 18:06:19 -0500
committerWim Van Sebroeck <wim@iguana.be>2012-03-27 13:59:26 -0400
commit27c766aaacb265d625dc634bf7903f7f9fd0c697 (patch)
tree06b399d21dec006bc0a3e1c6685b076753e19b94 /drivers/watchdog/pika_wdt.c
parent7cbc353540c31ffaf65ad44d89b955be0f1d04dc (diff)
watchdog: Use pr_<fmt> and pr_<level>
Use the current logging styles. Make sure all output has a prefix. Add missing newlines. Remove now unnecessary PFX, NAME, and miscellaneous other #defines. Coalesce formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/pika_wdt.c')
-rw-r--r--drivers/watchdog/pika_wdt.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c
index 2d22e996e996..e2877623ac44 100644
--- a/drivers/watchdog/pika_wdt.c
+++ b/drivers/watchdog/pika_wdt.c
@@ -5,6 +5,8 @@
5 * Sean MacLennan <smaclennan@pikatech.com> 5 * Sean MacLennan <smaclennan@pikatech.com>
6 */ 6 */
7 7
8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
9
8#include <linux/init.h> 10#include <linux/init.h>
9#include <linux/errno.h> 11#include <linux/errno.h>
10#include <linux/module.h> 12#include <linux/module.h>
@@ -23,7 +25,6 @@
23#include <linux/of_platform.h> 25#include <linux/of_platform.h>
24 26
25#define DRV_NAME "PIKA-WDT" 27#define DRV_NAME "PIKA-WDT"
26#define PFX DRV_NAME ": "
27 28
28/* Hardware timeout in seconds */ 29/* Hardware timeout in seconds */
29#define WDT_HW_TIMEOUT 2 30#define WDT_HW_TIMEOUT 2
@@ -90,7 +91,7 @@ static void pikawdt_ping(unsigned long data)
90 pikawdt_reset(); 91 pikawdt_reset();
91 mod_timer(&pikawdt_private.timer, jiffies + WDT_TIMEOUT); 92 mod_timer(&pikawdt_private.timer, jiffies + WDT_TIMEOUT);
92 } else 93 } else
93 printk(KERN_CRIT PFX "I will reset your machine !\n"); 94 pr_crit("I will reset your machine !\n");
94} 95}
95 96
96 97
@@ -228,14 +229,14 @@ static int __init pikawdt_init(void)
228 229
229 np = of_find_compatible_node(NULL, NULL, "pika,fpga"); 230 np = of_find_compatible_node(NULL, NULL, "pika,fpga");
230 if (np == NULL) { 231 if (np == NULL) {
231 printk(KERN_ERR PFX "Unable to find fpga.\n"); 232 pr_err("Unable to find fpga\n");
232 return -ENOENT; 233 return -ENOENT;
233 } 234 }
234 235
235 pikawdt_private.fpga = of_iomap(np, 0); 236 pikawdt_private.fpga = of_iomap(np, 0);
236 of_node_put(np); 237 of_node_put(np);
237 if (pikawdt_private.fpga == NULL) { 238 if (pikawdt_private.fpga == NULL) {
238 printk(KERN_ERR PFX "Unable to map fpga.\n"); 239 pr_err("Unable to map fpga\n");
239 return -ENOMEM; 240 return -ENOMEM;
240 } 241 }
241 242
@@ -244,7 +245,7 @@ static int __init pikawdt_init(void)
244 /* POST information is in the sd area. */ 245 /* POST information is in the sd area. */
245 np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd"); 246 np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd");
246 if (np == NULL) { 247 if (np == NULL) {
247 printk(KERN_ERR PFX "Unable to find fpga-sd.\n"); 248 pr_err("Unable to find fpga-sd\n");
248 ret = -ENOENT; 249 ret = -ENOENT;
249 goto out; 250 goto out;
250 } 251 }
@@ -252,7 +253,7 @@ static int __init pikawdt_init(void)
252 fpga = of_iomap(np, 0); 253 fpga = of_iomap(np, 0);
253 of_node_put(np); 254 of_node_put(np);
254 if (fpga == NULL) { 255 if (fpga == NULL) {
255 printk(KERN_ERR PFX "Unable to map fpga-sd.\n"); 256 pr_err("Unable to map fpga-sd\n");
256 ret = -ENOMEM; 257 ret = -ENOMEM;
257 goto out; 258 goto out;
258 } 259 }
@@ -271,12 +272,12 @@ static int __init pikawdt_init(void)
271 272
272 ret = misc_register(&pikawdt_miscdev); 273 ret = misc_register(&pikawdt_miscdev);
273 if (ret) { 274 if (ret) {
274 printk(KERN_ERR PFX "Unable to register miscdev.\n"); 275 pr_err("Unable to register miscdev\n");
275 goto out; 276 goto out;
276 } 277 }
277 278
278 printk(KERN_INFO PFX "initialized. heartbeat=%d sec (nowayout=%d)\n", 279 pr_info("initialized. heartbeat=%d sec (nowayout=%d)\n",
279 heartbeat, nowayout); 280 heartbeat, nowayout);
280 return 0; 281 return 0;
281 282
282out: 283out: