diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-09-09 20:07:05 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-03-24 19:29:53 -0400 |
commit | 04292b2cf8f02a33cfc1054c0c51aa8c77731813 (patch) | |
tree | ff04fb51c5de7bd646d09d29d9d0ed012ca5a0df /arch/um/drivers/stdio_console.c | |
parent | cfe6b7c79daa0efa27f474f1fe2a88fd7af5cc47 (diff) |
um: get rid of lines_init()
move config-independent parts of initialization into
register_lines(), call setup_one_line() after it instead
of abusing ->init_str.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/drivers/stdio_console.c')
-rw-r--r-- | arch/um/drivers/stdio_console.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c index 32bd040138f0..fe581209d629 100644 --- a/arch/um/drivers/stdio_console.c +++ b/arch/um/drivers/stdio_console.c | |||
@@ -157,29 +157,28 @@ static int stdio_init(void) | |||
157 | int err; | 157 | int err; |
158 | int i; | 158 | int i; |
159 | 159 | ||
160 | for (i = 0; i < MAX_TTYS; i++) { | ||
161 | char *s = vt_conf[i]; | ||
162 | if (!s) | ||
163 | s = def_conf; | ||
164 | if (!s) | ||
165 | s = i ? CONFIG_CON_CHAN : CONFIG_CON_ZERO_CHAN; | ||
166 | if (s && strcmp(s, "none") != 0) | ||
167 | vts[i].init_str = s; | ||
168 | spin_lock_init(&vts[i].lock); | ||
169 | mutex_init(&vts[i].count_lock); | ||
170 | vts[i].driver = &driver; | ||
171 | } | ||
172 | err = register_lines(&driver, &console_ops, vts, | 160 | err = register_lines(&driver, &console_ops, vts, |
173 | ARRAY_SIZE(vts)); | 161 | ARRAY_SIZE(vts)); |
174 | if (err) | 162 | if (err) |
175 | return err; | 163 | return err; |
164 | |||
176 | printk(KERN_INFO "Initialized stdio console driver\n"); | 165 | printk(KERN_INFO "Initialized stdio console driver\n"); |
177 | 166 | ||
178 | new_title = add_xterm_umid(opts.xterm_title); | 167 | new_title = add_xterm_umid(opts.xterm_title); |
179 | if(new_title != NULL) | 168 | if(new_title != NULL) |
180 | opts.xterm_title = new_title; | 169 | opts.xterm_title = new_title; |
181 | 170 | ||
182 | lines_init(vts, ARRAY_SIZE(vts), &opts); | 171 | for (i = 0; i < MAX_TTYS; i++) { |
172 | char *error; | ||
173 | char *s = vt_conf[i]; | ||
174 | if (!s) | ||
175 | s = def_conf; | ||
176 | if (!s) | ||
177 | s = i ? CONFIG_CON_CHAN : CONFIG_CON_ZERO_CHAN; | ||
178 | if (setup_one_line(vts, i, s, &opts, &error)) | ||
179 | printk(KERN_ERR "setup_one_line failed for " | ||
180 | "device %d : %s\n", i, error); | ||
181 | } | ||
183 | 182 | ||
184 | con_init_done = 1; | 183 | con_init_done = 1; |
185 | register_console(&stdiocons); | 184 | register_console(&stdiocons); |