aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/i6300esb.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2008-08-06 16:19:41 -0400
committerWim Van Sebroeck <wim@iguana.be>2008-08-06 16:19:41 -0400
commit7944d3a5a70ee5c1904ed1e8b1d71ff0af2854d9 (patch)
treefe6ec1a557a4b27712266d9d86f791c69e8e2596 /drivers/watchdog/i6300esb.c
parent12b7a1523eda9cd72362fdda928ddb995ecdc06d (diff)
[WATCHDOG] more coding style clean-up's
More coding style clean-up's. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/i6300esb.c')
-rw-r--r--drivers/watchdog/i6300esb.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c
index c768cb718904..c13383f7fcb9 100644
--- a/drivers/watchdog/i6300esb.c
+++ b/drivers/watchdog/i6300esb.c
@@ -9,18 +9,18 @@
9 * as published by the Free Software Foundation; either version 9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 * 11 *
12 * based on i810-tco.c which is in turn based on softdog.c 12 * based on i810-tco.c which is in turn based on softdog.c
13 * 13 *
14 * The timer is implemented in the following I/O controller hubs: 14 * The timer is implemented in the following I/O controller hubs:
15 * (See the intel documentation on http://developer.intel.com.) 15 * (See the intel documentation on http://developer.intel.com.)
16 * 6300ESB chip : document number 300641-003 16 * 6300ESB chip : document number 300641-003
17 * 17 *
18 * 2004YYZZ Ross Biro 18 * 2004YYZZ Ross Biro
19 * Initial version 0.01 19 * Initial version 0.01
20 * 2004YYZZ Ross Biro 20 * 2004YYZZ Ross Biro
21 * Version 0.02 21 * Version 0.02
22 * 20050210 David Härdeman <david@2gen.com> 22 * 20050210 David Härdeman <david@2gen.com>
23 * Ported driver to kernel 2.6 23 * Ported driver to kernel 2.6
24 */ 24 */
25 25
26/* 26/*
@@ -108,7 +108,8 @@ MODULE_PARM_DESC(nowayout,
108 * reload register. After this the appropriate registers can be written 108 * reload register. After this the appropriate registers can be written
109 * to once before they need to be unlocked again. 109 * to once before they need to be unlocked again.
110 */ 110 */
111static inline void esb_unlock_registers(void) { 111static inline void esb_unlock_registers(void)
112{
112 writeb(ESB_UNLOCK1, ESB_RELOAD_REG); 113 writeb(ESB_UNLOCK1, ESB_RELOAD_REG);
113 writeb(ESB_UNLOCK2, ESB_RELOAD_REG); 114 writeb(ESB_UNLOCK2, ESB_RELOAD_REG);
114} 115}
@@ -169,7 +170,7 @@ static int esb_timer_set_heartbeat(int time)
169 170
170 /* Write timer 2 */ 171 /* Write timer 2 */
171 esb_unlock_registers(); 172 esb_unlock_registers();
172 writel(val, ESB_TIMER2_REG); 173 writel(val, ESB_TIMER2_REG);
173 174
174 /* Reload */ 175 /* Reload */
175 esb_unlock_registers(); 176 esb_unlock_registers();
@@ -196,7 +197,7 @@ static int esb_timer_read(void)
196} 197}
197 198
198/* 199/*
199 * /dev/watchdog handling 200 * /dev/watchdog handling
200 */ 201 */
201 202
202static int esb_open(struct inode *inode, struct file *file) 203static int esb_open(struct inode *inode, struct file *file)
@@ -242,7 +243,7 @@ static ssize_t esb_write(struct file *file, const char __user *data,
242 /* scan to see whether or not we got the magic character */ 243 /* scan to see whether or not we got the magic character */
243 for (i = 0; i != len; i++) { 244 for (i = 0; i != len; i++) {
244 char c; 245 char c;
245 if (get_user(c, data+i)) 246 if (get_user(c, data + i))
246 return -EFAULT; 247 return -EFAULT;
247 if (c == 'V') 248 if (c == 'V')
248 esb_expect_close = 42; 249 esb_expect_close = 42;
@@ -262,11 +263,11 @@ static long esb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
262 void __user *argp = (void __user *)arg; 263 void __user *argp = (void __user *)arg;
263 int __user *p = argp; 264 int __user *p = argp;
264 static struct watchdog_info ident = { 265 static struct watchdog_info ident = {
265 .options = WDIOF_SETTIMEOUT | 266 .options = WDIOF_SETTIMEOUT |
266 WDIOF_KEEPALIVEPING | 267 WDIOF_KEEPALIVEPING |
267 WDIOF_MAGICCLOSE, 268 WDIOF_MAGICCLOSE,
268 .firmware_version = 0, 269 .firmware_version = 0,
269 .identity = ESB_MODULE_NAME, 270 .identity = ESB_MODULE_NAME,
270 }; 271 };
271 272
272 switch (cmd) { 273 switch (cmd) {
@@ -324,10 +325,9 @@ static long esb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
324static int esb_notify_sys(struct notifier_block *this, 325static int esb_notify_sys(struct notifier_block *this,
325 unsigned long code, void *unused) 326 unsigned long code, void *unused)
326{ 327{
327 if (code == SYS_DOWN || code == SYS_HALT) { 328 if (code == SYS_DOWN || code == SYS_HALT)
328 /* Turn the WDT off */ 329 esb_timer_stop(); /* Turn the WDT off */
329 esb_timer_stop(); 330
330 }
331 return NOTIFY_DONE; 331 return NOTIFY_DONE;
332} 332}
333 333