+static void ssl_console_write(struct console *c, const char *string,
+ unsigned len)
+{
+ struct line *line = &serial_lines[c->index];
+
+ down(&line->sem);
+ console_write_chan(&line->chan_list, string, len);
+ up(&line->sem);
+}
+
+static struct tty_driver *ssl_console_device(struct console *c, int *index)
+{
+ *index = c->index;
+ return ssl_driver;
+}
+
+static int ssl_console_setup(struct console *co, char *options)
+{
+ struct line *line = &serial_lines[co->index];
+
+ return console_open_chan(line,co,&opts);
+}
+
+static struct console ssl_cons = {
+ .name = "ttyS",
+ .write = ssl_console_write,
+ .device = ssl_console_device,
+ .setup = ssl_console_setup,
+ .flags = CON_PRINTBUFFER,
+ .index = -1,
+};
+