diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-09-10 04:07:05 +0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-03-25 03:29:53 +0400 |
commit | 04292b2cf8f02a33cfc1054c0c51aa8c77731813 (patch) | |
tree | ff04fb51c5de7bd646d09d29d9d0ed012ca5a0df /arch/um/drivers/ssl.c | |
parent | cfe6b7c79daa0efa27f474f1fe2a88fd7af5cc47 (diff) | |
download | linux-04292b2cf8f02a33cfc1054c0c51aa8c77731813.tar.xz |
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/ssl.c')
-rw-r--r-- | arch/um/drivers/ssl.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c index 6398a47d035b..d0b5ccf2379f 100644 --- a/arch/um/drivers/ssl.c +++ b/arch/um/drivers/ssl.c @@ -187,16 +187,6 @@ static int ssl_init(void) printk(KERN_INFO "Initializing software serial port version %d\n", ssl_version); - for (i = 0; i < NR_PORTS; i++) { - char *s = conf[i]; - if (!s) - s = def_conf; - if (s && strcmp(s, "none") != 0) - serial_lines[i].init_str = s; - spin_lock_init(&serial_lines[i].lock); - mutex_init(&serial_lines[i].count_lock); - serial_lines[i].driver = &driver; - } err = register_lines(&driver, &ssl_ops, serial_lines, ARRAY_SIZE(serial_lines)); if (err) @@ -206,7 +196,15 @@ static int ssl_init(void) if (new_title != NULL) opts.xterm_title = new_title; - lines_init(serial_lines, ARRAY_SIZE(serial_lines), &opts); + for (i = 0; i < NR_PORTS; i++) { + char *error; + char *s = conf[i]; + if (!s) + s = def_conf; + if (setup_one_line(serial_lines, i, s, &opts, &error)) + printk(KERN_ERR "setup_one_line failed for " + "device %d : %s\n", i, error); + } ssl_init_done = 1; register_console(&ssl_cons); |