aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/indydog.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/indydog.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/indydog.c')
-rw-r--r--drivers/watchdog/indydog.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/watchdog/indydog.c b/drivers/watchdog/indydog.c
index 1475e09f9af2..5fa5b2d25e8f 100644
--- a/drivers/watchdog/indydog.c
+++ b/drivers/watchdog/indydog.c
@@ -12,6 +12,8 @@
12 * based on softdog.c by Alan Cox <alan@lxorguk.ukuu.org.uk> 12 * based on softdog.c by Alan Cox <alan@lxorguk.ukuu.org.uk>
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/moduleparam.h> 18#include <linux/moduleparam.h>
17#include <linux/types.h> 19#include <linux/types.h>
@@ -26,7 +28,6 @@
26#include <linux/uaccess.h> 28#include <linux/uaccess.h>
27#include <asm/sgi/mc.h> 29#include <asm/sgi/mc.h>
28 30
29#define PFX "indydog: "
30static unsigned long indydog_alive; 31static unsigned long indydog_alive;
31static DEFINE_SPINLOCK(indydog_lock); 32static DEFINE_SPINLOCK(indydog_lock);
32 33
@@ -60,7 +61,7 @@ static void indydog_stop(void)
60 sgimc->cpuctrl0 = mc_ctrl0; 61 sgimc->cpuctrl0 = mc_ctrl0;
61 spin_unlock(&indydog_lock); 62 spin_unlock(&indydog_lock);
62 63
63 printk(KERN_INFO PFX "Stopped watchdog timer.\n"); 64 pr_info("Stopped watchdog timer\n");
64} 65}
65 66
66static void indydog_ping(void) 67static void indydog_ping(void)
@@ -83,7 +84,7 @@ static int indydog_open(struct inode *inode, struct file *file)
83 indydog_start(); 84 indydog_start();
84 indydog_ping(); 85 indydog_ping();
85 86
86 printk(KERN_INFO "Started watchdog timer.\n"); 87 pr_info("Started watchdog timer\n");
87 88
88 return nonseekable_open(inode, file); 89 return nonseekable_open(inode, file);
89} 90}
@@ -178,30 +179,25 @@ static struct notifier_block indydog_notifier = {
178 .notifier_call = indydog_notify_sys, 179 .notifier_call = indydog_notify_sys,
179}; 180};
180 181
181static char banner[] __initdata =
182 KERN_INFO PFX "Hardware Watchdog Timer for SGI IP22: 0.3\n";
183
184static int __init watchdog_init(void) 182static int __init watchdog_init(void)
185{ 183{
186 int ret; 184 int ret;
187 185
188 ret = register_reboot_notifier(&indydog_notifier); 186 ret = register_reboot_notifier(&indydog_notifier);
189 if (ret) { 187 if (ret) {
190 printk(KERN_ERR PFX 188 pr_err("cannot register reboot notifier (err=%d)\n", ret);
191 "cannot register reboot notifier (err=%d)\n", ret);
192 return ret; 189 return ret;
193 } 190 }
194 191
195 ret = misc_register(&indydog_miscdev); 192 ret = misc_register(&indydog_miscdev);
196 if (ret) { 193 if (ret) {
197 printk(KERN_ERR PFX 194 pr_err("cannot register miscdev on minor=%d (err=%d)\n",
198 "cannot register miscdev on minor=%d (err=%d)\n", 195 WATCHDOG_MINOR, ret);
199 WATCHDOG_MINOR, ret);
200 unregister_reboot_notifier(&indydog_notifier); 196 unregister_reboot_notifier(&indydog_notifier);
201 return ret; 197 return ret;
202 } 198 }
203 199
204 printk(banner); 200 pr_info("Hardware Watchdog Timer for SGI IP22: 0.3\n");
205 201
206 return 0; 202 return 0;
207} 203}