diff options
Diffstat (limited to 'drivers/tty/ipwireless/tty.c')
-rw-r--r-- | drivers/tty/ipwireless/tty.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c index e3a5a5ba752c..9edd5ae17580 100644 --- a/drivers/tty/ipwireless/tty.c +++ b/drivers/tty/ipwireless/tty.c @@ -564,9 +564,10 @@ int ipwireless_tty_init(void) { int result; - ipw_tty_driver = alloc_tty_driver(IPWIRELESS_PCMCIA_MINORS); - if (!ipw_tty_driver) - return -ENOMEM; + ipw_tty_driver = tty_alloc_driver(IPWIRELESS_PCMCIA_MINORS, + TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV); + if (IS_ERR(ipw_tty_driver)) + return PTR_ERR(ipw_tty_driver); ipw_tty_driver->driver_name = IPWIRELESS_PCCARD_NAME; ipw_tty_driver->name = "ttyIPWp"; @@ -574,7 +575,6 @@ int ipwireless_tty_init(void) ipw_tty_driver->minor_start = IPWIRELESS_PCMCIA_START; ipw_tty_driver->type = TTY_DRIVER_TYPE_SERIAL; ipw_tty_driver->subtype = SERIAL_TYPE_NORMAL; - ipw_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ipw_tty_driver->init_termios = tty_std_termios; ipw_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; @@ -585,7 +585,7 @@ int ipwireless_tty_init(void) if (result) { printk(KERN_ERR IPWIRELESS_PCCARD_NAME ": failed to register tty driver\n"); - put_tty_driver(ipw_tty_driver); + tty_driver_kref_put(ipw_tty_driver); return result; } @@ -595,7 +595,7 @@ int ipwireless_tty_init(void) void ipwireless_tty_release(void) { tty_unregister_driver(ipw_tty_driver); - put_tty_driver(ipw_tty_driver); + tty_driver_kref_put(ipw_tty_driver); } int ipwireless_tty_is_modem(struct ipw_tty *tty) |