diff options
Diffstat (limited to 'drivers/s390/char/con3215.c')
-rw-r--r-- | drivers/s390/char/con3215.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 67c0009ca545..f356607835d8 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c @@ -1076,13 +1076,13 @@ static int __init tty3215_init(void) if (!CONSOLE_IS_3215) return 0; - driver = alloc_tty_driver(NR_3215); - if (!driver) - return -ENOMEM; + driver = tty_alloc_driver(NR_3215, TTY_DRIVER_REAL_RAW); + if (IS_ERR(driver)) + return PTR_ERR(driver); ret = ccw_driver_register(&raw3215_ccw_driver); if (ret) { - put_tty_driver(driver); + tty_driver_kref_put(driver); return ret; } /* @@ -1101,11 +1101,10 @@ static int __init tty3215_init(void) driver->init_termios.c_iflag = IGNBRK | IGNPAR; driver->init_termios.c_oflag = ONLCR; driver->init_termios.c_lflag = ISIG; - driver->flags = TTY_DRIVER_REAL_RAW; tty_set_operations(driver, &tty3215_ops); ret = tty_register_driver(driver); if (ret) { - put_tty_driver(driver); + tty_driver_kref_put(driver); return ret; } tty3215_driver = driver; |