diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2005-12-10 08:22:37 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2006-02-12 08:45:56 -0500 |
commit | fd41fa616f21efc36eb80696475ceb33ea047a6a (patch) | |
tree | 5730d4775e3796861be4a0ffd039c04410a86490 | |
parent | 3a69e5791379a7c7d23c531a7679428300bb5072 (diff) |
[WATCHDOG] pcwd.c add comments + tabs
add extra comments for the include files
changes spaces by tabs where it is appropriate.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r-- | drivers/char/watchdog/pcwd.c | 71 |
1 files changed, 37 insertions, 34 deletions
diff --git a/drivers/char/watchdog/pcwd.c b/drivers/char/watchdog/pcwd.c index 37c9e13ad3ac..85c94b205df1 100644 --- a/drivers/char/watchdog/pcwd.c +++ b/drivers/char/watchdog/pcwd.c | |||
@@ -49,27 +49,30 @@ | |||
49 | * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ | 49 | * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #include <linux/module.h> | 52 | #include <linux/config.h> /* For CONFIG_WATCHDOG_NOWAYOUT/... */ |
53 | #include <linux/moduleparam.h> | 53 | #include <linux/module.h> /* For module specific items */ |
54 | #include <linux/types.h> | 54 | #include <linux/moduleparam.h> /* For new moduleparam's */ |
55 | #include <linux/timer.h> | 55 | #include <linux/types.h> /* For standard types (like size_t) */ |
56 | #include <linux/jiffies.h> | 56 | #include <linux/errno.h> /* For the -ENODEV/... values */ |
57 | #include <linux/config.h> | 57 | #include <linux/kernel.h> /* For printk/panic/... */ |
58 | #include <linux/wait.h> | 58 | #include <linux/delay.h> /* For mdelay function */ |
59 | #include <linux/slab.h> | 59 | #include <linux/timer.h> /* For timer related operations */ |
60 | #include <linux/ioport.h> | 60 | #include <linux/jiffies.h> /* For jiffies stuff */ |
61 | #include <linux/delay.h> | 61 | #include <linux/miscdevice.h> /* For MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR) */ |
62 | #include <linux/fs.h> | 62 | #include <linux/watchdog.h> /* For the watchdog specific items */ |
63 | #include <linux/miscdevice.h> | 63 | #include <linux/notifier.h> /* For notifier support */ |
64 | #include <linux/watchdog.h> | 64 | #include <linux/reboot.h> /* For reboot_notifier stuff */ |
65 | #include <linux/notifier.h> | 65 | #include <linux/init.h> /* For __init/__exit/... */ |
66 | #include <linux/init.h> | 66 | #include <linux/fs.h> /* For file operations */ |
67 | #include <linux/spinlock.h> | 67 | #include <linux/ioport.h> /* For io-port access */ |
68 | #include <linux/reboot.h> | 68 | #include <linux/spinlock.h> /* For spin_lock/spin_unlock/... */ |
69 | #include <linux/sched.h> /* TASK_INTERRUPTIBLE, set_current_state() and friends */ | 69 | #include <linux/sched.h> /* TASK_INTERRUPTIBLE, set_current_state() and friends */ |
70 | #include <asm/uaccess.h> | 70 | #include <linux/slab.h> /* For kmalloc */ |
71 | #include <asm/io.h> | ||
72 | 71 | ||
72 | #include <asm/uaccess.h> /* For copy_to_user/put_user/... */ | ||
73 | #include <asm/io.h> /* For inb/outb/... */ | ||
74 | |||
75 | /* Module and version information */ | ||
73 | #define WD_VER "1.16 (06/12/2004)" | 76 | #define WD_VER "1.16 (06/12/2004)" |
74 | #define PFX "pcwd: " | 77 | #define PFX "pcwd: " |
75 | 78 | ||
@@ -84,7 +87,7 @@ | |||
84 | #define PCWD_REVISION_C 2 | 87 | #define PCWD_REVISION_C 2 |
85 | 88 | ||
86 | /* | 89 | /* |
87 | * These are the defines that describe the control status bits for the | 90 | * These are the defines that describe the control status #1 bits for the |
88 | * PC Watchdog card, revision A. | 91 | * PC Watchdog card, revision A. |
89 | */ | 92 | */ |
90 | #define WD_WDRST 0x01 /* Previously reset state */ | 93 | #define WD_WDRST 0x01 /* Previously reset state */ |
@@ -94,7 +97,7 @@ | |||
94 | #define WD_SRLY2 0x80 /* Software external relay triggered */ | 97 | #define WD_SRLY2 0x80 /* Software external relay triggered */ |
95 | 98 | ||
96 | /* | 99 | /* |
97 | * These are the defines that describe the control status bits for the | 100 | * These are the defines that describe the control status #1 bits for the |
98 | * PC Watchdog card, revision C. | 101 | * PC Watchdog card, revision C. |
99 | */ | 102 | */ |
100 | #define WD_REVC_WTRP 0x01 /* Watchdog Trip status */ | 103 | #define WD_REVC_WTRP 0x01 /* Watchdog Trip status */ |
@@ -106,15 +109,15 @@ | |||
106 | #define ISA_COMMAND_TIMEOUT 1000 | 109 | #define ISA_COMMAND_TIMEOUT 1000 |
107 | 110 | ||
108 | /* Watchdog's internal commands */ | 111 | /* Watchdog's internal commands */ |
109 | #define CMD_ISA_IDLE 0x00 | 112 | #define CMD_ISA_IDLE 0x00 |
110 | #define CMD_ISA_VERSION_INTEGER 0x01 | 113 | #define CMD_ISA_VERSION_INTEGER 0x01 |
111 | #define CMD_ISA_VERSION_TENTH 0x02 | 114 | #define CMD_ISA_VERSION_TENTH 0x02 |
112 | #define CMD_ISA_VERSION_HUNDRETH 0x03 | 115 | #define CMD_ISA_VERSION_HUNDRETH 0x03 |
113 | #define CMD_ISA_VERSION_MINOR 0x04 | 116 | #define CMD_ISA_VERSION_MINOR 0x04 |
114 | #define CMD_ISA_SWITCH_SETTINGS 0x05 | 117 | #define CMD_ISA_SWITCH_SETTINGS 0x05 |
115 | #define CMD_ISA_DELAY_TIME_2SECS 0x0A | 118 | #define CMD_ISA_DELAY_TIME_2SECS 0x0A |
116 | #define CMD_ISA_DELAY_TIME_4SECS 0x0B | 119 | #define CMD_ISA_DELAY_TIME_4SECS 0x0B |
117 | #define CMD_ISA_DELAY_TIME_8SECS 0x0C | 120 | #define CMD_ISA_DELAY_TIME_8SECS 0x0C |
118 | 121 | ||
119 | /* | 122 | /* |
120 | * We are using an kernel timer to do the pinging of the watchdog | 123 | * We are using an kernel timer to do the pinging of the watchdog |
@@ -767,10 +770,10 @@ static int __devinit pcwatchdog_init(int base_addr) | |||
767 | printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n"); | 770 | printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n"); |
768 | 771 | ||
769 | /* Check that the heartbeat value is within it's range ; if not reset to the default */ | 772 | /* Check that the heartbeat value is within it's range ; if not reset to the default */ |
770 | if (pcwd_set_heartbeat(heartbeat)) { | 773 | if (pcwd_set_heartbeat(heartbeat)) { |
771 | pcwd_set_heartbeat(WATCHDOG_HEARTBEAT); | 774 | pcwd_set_heartbeat(WATCHDOG_HEARTBEAT); |
772 | printk(KERN_INFO PFX "heartbeat value must be 2<=heartbeat<=7200, using %d\n", | 775 | printk(KERN_INFO PFX "heartbeat value must be 2<=heartbeat<=7200, using %d\n", |
773 | WATCHDOG_HEARTBEAT); | 776 | WATCHDOG_HEARTBEAT); |
774 | } | 777 | } |
775 | 778 | ||
776 | ret = register_reboot_notifier(&pcwd_notifier); | 779 | ret = register_reboot_notifier(&pcwd_notifier); |