aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/sbc_epx_c3.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/sbc_epx_c3.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/sbc_epx_c3.c')
-rw-r--r--drivers/watchdog/sbc_epx_c3.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/watchdog/sbc_epx_c3.c b/drivers/watchdog/sbc_epx_c3.c
index eaca366b7234..1a13d36c5f12 100644
--- a/drivers/watchdog/sbc_epx_c3.c
+++ b/drivers/watchdog/sbc_epx_c3.c
@@ -13,6 +13,8 @@
13 * based on softdog.c by Alan Cox <alan@lxorguk.ukuu.org.uk> 13 * based on softdog.c by Alan Cox <alan@lxorguk.ukuu.org.uk>
14 */ 14 */
15 15
16#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
17
16#include <linux/module.h> 18#include <linux/module.h>
17#include <linux/moduleparam.h> 19#include <linux/moduleparam.h>
18#include <linux/types.h> 20#include <linux/types.h>
@@ -28,7 +30,6 @@
28#include <linux/uaccess.h> 30#include <linux/uaccess.h>
29#include <linux/io.h> 31#include <linux/io.h>
30 32
31#define PFX "epx_c3: "
32static int epx_c3_alive; 33static int epx_c3_alive;
33 34
34#define WATCHDOG_TIMEOUT 1 /* 1 sec default timeout */ 35#define WATCHDOG_TIMEOUT 1 /* 1 sec default timeout */
@@ -51,7 +52,7 @@ static void epx_c3_stop(void)
51 52
52 outb(0, EPXC3_WATCHDOG_CTL_REG); 53 outb(0, EPXC3_WATCHDOG_CTL_REG);
53 54
54 printk(KERN_INFO PFX "Stopped watchdog timer.\n"); 55 pr_info("Stopped watchdog timer\n");
55} 56}
56 57
57static void epx_c3_pet(void) 58static void epx_c3_pet(void)
@@ -75,7 +76,7 @@ static int epx_c3_open(struct inode *inode, struct file *file)
75 epx_c3_pet(); 76 epx_c3_pet();
76 77
77 epx_c3_alive = 1; 78 epx_c3_alive = 1;
78 printk(KERN_INFO "Started watchdog timer.\n"); 79 pr_info("Started watchdog timer\n");
79 80
80 return nonseekable_open(inode, file); 81 return nonseekable_open(inode, file);
81} 82}
@@ -173,9 +174,6 @@ static struct notifier_block epx_c3_notifier = {
173 .notifier_call = epx_c3_notify_sys, 174 .notifier_call = epx_c3_notify_sys,
174}; 175};
175 176
176static const char banner[] __initconst = KERN_INFO PFX
177 "Hardware Watchdog Timer for Winsystems EPX-C3 SBC: 0.1\n";
178
179static int __init watchdog_init(void) 177static int __init watchdog_init(void)
180{ 178{
181 int ret; 179 int ret;
@@ -185,20 +183,19 @@ static int __init watchdog_init(void)
185 183
186 ret = register_reboot_notifier(&epx_c3_notifier); 184 ret = register_reboot_notifier(&epx_c3_notifier);
187 if (ret) { 185 if (ret) {
188 printk(KERN_ERR PFX "cannot register reboot notifier " 186 pr_err("cannot register reboot notifier (err=%d)\n", ret);
189 "(err=%d)\n", ret);
190 goto out; 187 goto out;
191 } 188 }
192 189
193 ret = misc_register(&epx_c3_miscdev); 190 ret = misc_register(&epx_c3_miscdev);
194 if (ret) { 191 if (ret) {
195 printk(KERN_ERR PFX "cannot register miscdev on minor=%d " 192 pr_err("cannot register miscdev on minor=%d (err=%d)\n",
196 "(err=%d)\n", WATCHDOG_MINOR, ret); 193 WATCHDOG_MINOR, ret);
197 unregister_reboot_notifier(&epx_c3_notifier); 194 unregister_reboot_notifier(&epx_c3_notifier);
198 goto out; 195 goto out;
199 } 196 }
200 197
201 printk(banner); 198 pr_info("Hardware Watchdog Timer for Winsystems EPX-C3 SBC: 0.1\n");
202 199
203 return 0; 200 return 0;
204 201