summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ttyprintk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c
index 08755c52fc5f..be1c3fb186c1 100644
--- a/drivers/char/ttyprintk.c
+++ b/drivers/char/ttyprintk.c
@@ -180,6 +180,10 @@ static int __init ttyprintk_init(void)
int ret = -ENOMEM;
void *rp;
+ tty_port_init(&tpk_port.port);
+ tpk_port.port.ops = &null_ops;
+ mutex_init(&tpk_port.port_write_mutex);
+
ttyprintk_driver = alloc_tty_driver(1);
if (!ttyprintk_driver)
return ret;
@@ -210,10 +214,6 @@ static int __init ttyprintk_init(void)
goto error;
}
- tty_port_init(&tpk_port.port);
- tpk_port.port.ops = &null_ops;
- mutex_init(&tpk_port.port_write_mutex);
-
return 0;
error: