aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/capi/capi.c14
-rw-r--r--drivers/isdn/capi/capiutil.c2
2 files changed, 7 insertions, 9 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index d5f9261fa879..0f00be62438d 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1269,10 +1269,11 @@ static int __init capinc_tty_init(void)
if (!capiminors)
return -ENOMEM;
- drv = alloc_tty_driver(capi_ttyminors);
- if (!drv) {
+ drv = tty_alloc_driver(capi_ttyminors, TTY_DRIVER_REAL_RAW |
+ TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_DYNAMIC_DEV);
+ if (IS_ERR(drv)) {
kfree(capiminors);
- return -ENOMEM;
+ return PTR_ERR(drv);
}
drv->driver_name = "capi_nc";
drv->name = "capi!";
@@ -1285,14 +1286,11 @@ static int __init capinc_tty_init(void)
drv->init_termios.c_oflag = OPOST | ONLCR;
drv->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
drv->init_termios.c_lflag = 0;
- drv->flags =
- TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS |
- TTY_DRIVER_DYNAMIC_DEV;
tty_set_operations(drv, &capinc_ops);
err = tty_register_driver(drv);
if (err) {
- put_tty_driver(drv);
+ tty_driver_kref_put(drv);
kfree(capiminors);
printk(KERN_ERR "Couldn't register capi_nc driver\n");
return err;
@@ -1304,7 +1302,7 @@ static int __init capinc_tty_init(void)
static void __exit capinc_tty_exit(void)
{
tty_unregister_driver(capinc_tty_driver);
- put_tty_driver(capinc_tty_driver);
+ tty_driver_kref_put(capinc_tty_driver);
kfree(capiminors);
}
diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c
index f26bf3c66d7e..d7ae42edc4a8 100644
--- a/drivers/isdn/capi/capiutil.c
+++ b/drivers/isdn/capi/capiutil.c
@@ -379,7 +379,7 @@ static char *pnames[] =
/*2f */ "Useruserdata"
};
-#include <stdarg.h>
+#include <linux/stdarg.h>
/*-------------------------------------------------------*/
static _cdebbuf *bufprint(_cdebbuf *cdb, char *fmt, ...)