diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-01-06 03:18:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:45 -0500 |
commit | d50084a2991f3d9490d5c0f3af72e6fe1515a493 (patch) | |
tree | 051d6c46ddab1ee47db40252cdad4cbbe0a04f5b /arch/um/drivers/stdio_console.c | |
parent | 1b57e9c27882a908f180d4daf72ee12c6f137178 (diff) |
[PATCH] uml: Formatting changes
This patch makes a bunch of non-functional changes -
return(foo); becomes return foo;
some statements are broken across lines for readability
some trailing whitespace is cleaned up
open_one_chan took four arguments, three of which could be
deduced from the first. Accordingly, they were eliminated.
some examples of "} else {" had a newline added
some whitespace cleanup in the indentation
lines_init got some control flow cleanup
some long lines were broken
removed another emacs-specific C formatting comment
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/stdio_console.c')
-rw-r--r-- | arch/um/drivers/stdio_console.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c index 005aa6333b6e..8f3b168a4b6a 100644 --- a/arch/um/drivers/stdio_console.c +++ b/arch/um/drivers/stdio_console.c | |||
@@ -75,7 +75,7 @@ static struct line_driver driver = { | |||
75 | .name = "con", | 75 | .name = "con", |
76 | .config = con_config, | 76 | .config = con_config, |
77 | .get_config = con_get_config, | 77 | .get_config = con_get_config, |
78 | .id = line_id, | 78 | .id = line_id, |
79 | .remove = con_remove, | 79 | .remove = con_remove, |
80 | }, | 80 | }, |
81 | }; | 81 | }; |
@@ -86,23 +86,23 @@ static struct lines console_lines = LINES_INIT(MAX_TTYS); | |||
86 | * individual elements are protected by individual semaphores. | 86 | * individual elements are protected by individual semaphores. |
87 | */ | 87 | */ |
88 | struct line vts[MAX_TTYS] = { LINE_INIT(CONFIG_CON_ZERO_CHAN, &driver), | 88 | struct line vts[MAX_TTYS] = { LINE_INIT(CONFIG_CON_ZERO_CHAN, &driver), |
89 | [ 1 ... MAX_TTYS - 1 ] = | 89 | [ 1 ... MAX_TTYS - 1 ] = |
90 | LINE_INIT(CONFIG_CON_CHAN, &driver) }; | 90 | LINE_INIT(CONFIG_CON_CHAN, &driver) }; |
91 | 91 | ||
92 | static int con_config(char *str) | 92 | static int con_config(char *str) |
93 | { | 93 | { |
94 | return(line_config(vts, sizeof(vts)/sizeof(vts[0]), str)); | 94 | return line_config(vts, sizeof(vts)/sizeof(vts[0]), str); |
95 | } | 95 | } |
96 | 96 | ||
97 | static int con_get_config(char *dev, char *str, int size, char **error_out) | 97 | static int con_get_config(char *dev, char *str, int size, char **error_out) |
98 | { | 98 | { |
99 | return(line_get_config(dev, vts, sizeof(vts)/sizeof(vts[0]), str, | 99 | return line_get_config(dev, vts, sizeof(vts)/sizeof(vts[0]), str, |
100 | size, error_out)); | 100 | size, error_out); |
101 | } | 101 | } |
102 | 102 | ||
103 | static int con_remove(int n) | 103 | static int con_remove(int n) |
104 | { | 104 | { |
105 | return line_remove(vts, sizeof(vts)/sizeof(vts[0]), n); | 105 | return line_remove(vts, sizeof(vts)/sizeof(vts[0]), n); |
106 | } | 106 | } |
107 | 107 | ||
108 | static int con_open(struct tty_struct *tty, struct file *filp) | 108 | static int con_open(struct tty_struct *tty, struct file *filp) |
@@ -117,7 +117,7 @@ static struct tty_operations console_ops = { | |||
117 | .close = line_close, | 117 | .close = line_close, |
118 | .write = line_write, | 118 | .write = line_write, |
119 | .put_char = line_put_char, | 119 | .put_char = line_put_char, |
120 | .write_room = line_write_room, | 120 | .write_room = line_write_room, |
121 | .chars_in_buffer = line_chars_in_buffer, | 121 | .chars_in_buffer = line_chars_in_buffer, |
122 | .flush_buffer = line_flush_buffer, | 122 | .flush_buffer = line_flush_buffer, |
123 | .flush_chars = line_flush_chars, | 123 | .flush_chars = line_flush_chars, |
@@ -126,7 +126,7 @@ static struct tty_operations console_ops = { | |||
126 | }; | 126 | }; |
127 | 127 | ||
128 | static void uml_console_write(struct console *console, const char *string, | 128 | static void uml_console_write(struct console *console, const char *string, |
129 | unsigned len) | 129 | unsigned len) |
130 | { | 130 | { |
131 | struct line *line = &vts[console->index]; | 131 | struct line *line = &vts[console->index]; |
132 | unsigned long flags; | 132 | unsigned long flags; |
@@ -146,7 +146,7 @@ static int uml_console_setup(struct console *co, char *options) | |||
146 | { | 146 | { |
147 | struct line *line = &vts[co->index]; | 147 | struct line *line = &vts[co->index]; |
148 | 148 | ||
149 | return console_open_chan(line,co,&opts); | 149 | return console_open_chan(line, co, &opts); |
150 | } | 150 | } |
151 | 151 | ||
152 | static struct console stdiocons = { | 152 | static struct console stdiocons = { |
@@ -156,7 +156,7 @@ static struct console stdiocons = { | |||
156 | .setup = uml_console_setup, | 156 | .setup = uml_console_setup, |
157 | .flags = CON_PRINTBUFFER, | 157 | .flags = CON_PRINTBUFFER, |
158 | .index = -1, | 158 | .index = -1, |
159 | .data = &vts, | 159 | .data = &vts, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | int stdio_init(void) | 162 | int stdio_init(void) |
@@ -166,7 +166,7 @@ int stdio_init(void) | |||
166 | console_driver = line_register_devfs(&console_lines, &driver, | 166 | console_driver = line_register_devfs(&console_lines, &driver, |
167 | &console_ops, vts, | 167 | &console_ops, vts, |
168 | ARRAY_SIZE(vts)); | 168 | ARRAY_SIZE(vts)); |
169 | if (NULL == console_driver) | 169 | if (console_driver == NULL) |
170 | return -1; | 170 | return -1; |
171 | printk(KERN_INFO "Initialized stdio console driver\n"); | 171 | printk(KERN_INFO "Initialized stdio console driver\n"); |
172 | 172 | ||
@@ -178,7 +178,7 @@ int stdio_init(void) | |||
178 | 178 | ||
179 | con_init_done = 1; | 179 | con_init_done = 1; |
180 | register_console(&stdiocons); | 180 | register_console(&stdiocons); |
181 | return(0); | 181 | return 0; |
182 | } | 182 | } |
183 | late_initcall(stdio_init); | 183 | late_initcall(stdio_init); |
184 | 184 | ||
@@ -192,7 +192,7 @@ __uml_exitcall(console_exit); | |||
192 | 192 | ||
193 | static int console_chan_setup(char *str) | 193 | static int console_chan_setup(char *str) |
194 | { | 194 | { |
195 | return(line_setup(vts, sizeof(vts)/sizeof(vts[0]), str, 1)); | 195 | return line_setup(vts, sizeof(vts)/sizeof(vts[0]), str, 1); |
196 | } | 196 | } |
197 | __setup("con", console_chan_setup); | 197 | __setup("con", console_chan_setup); |
198 | __channel_help(console_chan_setup, "con"); | 198 | __channel_help(console_chan_setup, "con"); |