aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-02-10 04:43:58 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:21 -0500
commit5bbcbeca2c8933ee2b3402ea5eca523d971a8785 (patch)
treeff0107d3d0d8537e0719eaa5e4d8b3108aeabd01 /arch
parent42d36115d25725fb551250c8f70602a12aa8dee2 (diff)
[PATCH] uml: watchdog driver formatting
Whitespace and style fixes. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/drivers/harddog_kern.c33
-rw-r--r--arch/um/drivers/harddog_user.c23
2 files changed, 17 insertions, 39 deletions
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c
index 94bbcb5b9227..73c5caa7a150 100644
--- a/arch/um/drivers/harddog_kern.c
+++ b/arch/um/drivers/harddog_kern.c
@@ -9,10 +9,10 @@
9 * modify it under the terms of the GNU General Public License 9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
12 * 12 *
13 * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide 13 * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
14 * warranty for any of this software. This material is provided 14 * warranty for any of this software. This material is provided
15 * "AS-IS" and at no charge. 15 * "AS-IS" and at no charge.
16 * 16 *
17 * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk> 17 * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
18 * 18 *
@@ -29,11 +29,11 @@
29 * Made SMP safe for 2.3.x 29 * Made SMP safe for 2.3.x
30 * 30 *
31 * 20011127 Joel Becker (jlbec@evilplan.org> 31 * 20011127 Joel Becker (jlbec@evilplan.org>
32 * Added soft_noboot; Allows testing the softdog trigger without 32 * Added soft_noboot; Allows testing the softdog trigger without
33 * requiring a recompile. 33 * requiring a recompile.
34 * Added WDIOC_GETTIMEOUT and WDIOC_SETTIMOUT. 34 * Added WDIOC_GETTIMEOUT and WDIOC_SETTIMOUT.
35 */ 35 */
36 36
37#include <linux/module.h> 37#include <linux/module.h>
38#include <linux/types.h> 38#include <linux/types.h>
39#include <linux/kernel.h> 39#include <linux/kernel.h>
@@ -58,7 +58,7 @@ static int harddog_out_fd = -1;
58/* 58/*
59 * Allow only one person to hold it open 59 * Allow only one person to hold it open
60 */ 60 */
61 61
62extern int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock); 62extern int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock);
63 63
64static int harddog_open(struct inode *inode, struct file *file) 64static int harddog_open(struct inode *inode, struct file *file)
@@ -69,7 +69,7 @@ static int harddog_open(struct inode *inode, struct file *file)
69 spin_lock(&lock); 69 spin_lock(&lock);
70 if(timer_alive) 70 if(timer_alive)
71 goto err; 71 goto err;
72#ifdef CONFIG_HARDDOG_NOWAYOUT 72#ifdef CONFIG_HARDDOG_NOWAYOUT
73 __module_get(THIS_MODULE); 73 __module_get(THIS_MODULE);
74#endif 74#endif
75 75
@@ -117,7 +117,7 @@ static ssize_t harddog_write(struct file *file, const char __user *data, size_t
117 * Refresh the timer. 117 * Refresh the timer.
118 */ 118 */
119 if(len) 119 if(len)
120 return(ping_watchdog(harddog_out_fd)); 120 return ping_watchdog(harddog_out_fd);
121 return 0; 121 return 0;
122} 122}
123 123
@@ -141,7 +141,7 @@ static int harddog_ioctl(struct inode *inode, struct file *file,
141 case WDIOC_GETBOOTSTATUS: 141 case WDIOC_GETBOOTSTATUS:
142 return put_user(0,(int __user *)argp); 142 return put_user(0,(int __user *)argp);
143 case WDIOC_KEEPALIVE: 143 case WDIOC_KEEPALIVE:
144 return(ping_watchdog(harddog_out_fd)); 144 return ping_watchdog(harddog_out_fd);
145 } 145 }
146} 146}
147 147
@@ -172,7 +172,7 @@ static int __init harddog_init(void)
172 172
173 printk(banner); 173 printk(banner);
174 174
175 return(0); 175 return 0;
176} 176}
177 177
178static void __exit harddog_exit(void) 178static void __exit harddog_exit(void)
@@ -182,14 +182,3 @@ static void __exit harddog_exit(void)
182 182
183module_init(harddog_init); 183module_init(harddog_init);
184module_exit(harddog_exit); 184module_exit(harddog_exit);
185
186/*
187 * Overrides for Emacs so that we follow Linus's tabbing style.
188 * Emacs will notice this stuff at the end of the file and automatically
189 * adjust the settings for this buffer only. This must remain at the end
190 * of the file.
191 * ---------------------------------------------------------------------------
192 * Local variables:
193 * c-file-style: "linux"
194 * End:
195 */
diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c
index def013b5a3c7..c495ecf263b1 100644
--- a/arch/um/drivers/harddog_user.c
+++ b/arch/um/drivers/harddog_user.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
@@ -38,7 +38,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
38 int in_fds[2], out_fds[2], pid, n, err; 38 int in_fds[2], out_fds[2], pid, n, err;
39 char pid_buf[sizeof("nnnnn\0")], c; 39 char pid_buf[sizeof("nnnnn\0")], c;
40 char *pid_args[] = { "/usr/bin/uml_watchdog", "-pid", pid_buf, NULL }; 40 char *pid_args[] = { "/usr/bin/uml_watchdog", "-pid", pid_buf, NULL };
41 char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL, 41 char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL,
42 NULL }; 42 NULL };
43 char **args = NULL; 43 char **args = NULL;
44 44
@@ -96,7 +96,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
96 } 96 }
97 *in_fd_ret = in_fds[0]; 97 *in_fd_ret = in_fds[0];
98 *out_fd_ret = out_fds[1]; 98 *out_fd_ret = out_fds[1];
99 return(0); 99 return 0;
100 100
101 out_close_in: 101 out_close_in:
102 os_close_file(in_fds[0]); 102 os_close_file(in_fds[0]);
@@ -105,7 +105,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
105 os_close_file(out_fds[0]); 105 os_close_file(out_fds[0]);
106 os_close_file(out_fds[1]); 106 os_close_file(out_fds[1]);
107 out: 107 out:
108 return(err); 108 return err;
109} 109}
110 110
111void stop_watchdog(int in_fd, int out_fd) 111void stop_watchdog(int in_fd, int out_fd)
@@ -123,20 +123,9 @@ int ping_watchdog(int fd)
123 if(n != sizeof(c)){ 123 if(n != sizeof(c)){
124 printk("ping_watchdog - write failed, err = %d\n", -n); 124 printk("ping_watchdog - write failed, err = %d\n", -n);
125 if(n < 0) 125 if(n < 0)
126 return(n); 126 return n;
127 return(-EIO); 127 return -EIO;
128 } 128 }
129 return 1; 129 return 1;
130 130
131} 131}
132
133/*
134 * Overrides for Emacs so that we follow Linus's tabbing style.
135 * Emacs will notice this stuff at the end of the file and automatically
136 * adjust the settings for this buffer only. This must remain at the end
137 * of the file.
138 * ---------------------------------------------------------------------------
139 * Local variables:
140 * c-file-style: "linux"
141 * End:
142 */