aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/ssl.c')
-rw-r--r--arch/um/drivers/ssl.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
index 23cffd6d85a..6398a47d035 100644
--- a/arch/um/drivers/ssl.c
+++ b/arch/um/drivers/ssl.c
@@ -20,12 +20,6 @@
20 20
21static const int ssl_version = 1; 21static const int ssl_version = 1;
22 22
23/* Referenced only by tty_driver below - presumably it's locked correctly
24 * by the tty driver.
25 */
26
27static struct tty_driver *ssl_driver;
28
29#define NR_PORTS 64 23#define NR_PORTS 64
30 24
31static void ssl_announce(char *dev_name, int dev) 25static void ssl_announce(char *dev_name, int dev)
@@ -164,7 +158,7 @@ static void ssl_console_write(struct console *c, const char *string,
164static struct tty_driver *ssl_console_device(struct console *c, int *index) 158static struct tty_driver *ssl_console_device(struct console *c, int *index)
165{ 159{
166 *index = c->index; 160 *index = c->index;
167 return ssl_driver; 161 return driver.driver;
168} 162}
169 163
170static int ssl_console_setup(struct console *co, char *options) 164static int ssl_console_setup(struct console *co, char *options)
@@ -187,6 +181,7 @@ static struct console ssl_cons = {
187static int ssl_init(void) 181static int ssl_init(void)
188{ 182{
189 char *new_title; 183 char *new_title;
184 int err;
190 int i; 185 int i;
191 186
192 printk(KERN_INFO "Initializing software serial port version %d\n", 187 printk(KERN_INFO "Initializing software serial port version %d\n",
@@ -196,16 +191,16 @@ static int ssl_init(void)
196 char *s = conf[i]; 191 char *s = conf[i];
197 if (!s) 192 if (!s)
198 s = def_conf; 193 s = def_conf;
199 if (s && strcmp(s, "none") != 0) { 194 if (s && strcmp(s, "none") != 0)
200 serial_lines[i].init_str = s; 195 serial_lines[i].init_str = s;
201 serial_lines[i].valid = 1;
202 }
203 spin_lock_init(&serial_lines[i].lock); 196 spin_lock_init(&serial_lines[i].lock);
204 mutex_init(&serial_lines[i].count_lock); 197 mutex_init(&serial_lines[i].count_lock);
205 serial_lines[i].driver = &driver; 198 serial_lines[i].driver = &driver;
206 } 199 }
207 ssl_driver = register_lines(&driver, &ssl_ops, serial_lines, 200 err = register_lines(&driver, &ssl_ops, serial_lines,
208 ARRAY_SIZE(serial_lines)); 201 ARRAY_SIZE(serial_lines));
202 if (err)
203 return err;
209 204
210 new_title = add_xterm_umid(opts.xterm_title); 205 new_title = add_xterm_umid(opts.xterm_title);
211 if (new_title != NULL) 206 if (new_title != NULL)