aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/capi/capi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/capi/capi.c')
-rw-r--r--drivers/isdn/capi/capi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 12dee8e9fbbe..04fb606b5ddd 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -58,7 +58,7 @@ MODULE_LICENSE("GPL");
58 58
59/* -------- driver information -------------------------------------- */ 59/* -------- driver information -------------------------------------- */
60 60
61static struct class_simple *capi_class; 61static struct class *capi_class;
62 62
63static int capi_major = 68; /* allocated */ 63static int capi_major = 68; /* allocated */
64#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE 64#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
@@ -1499,20 +1499,20 @@ static int __init capi_init(void)
1499 return -EIO; 1499 return -EIO;
1500 } 1500 }
1501 1501
1502 capi_class = class_simple_create(THIS_MODULE, "capi"); 1502 capi_class = class_create(THIS_MODULE, "capi");
1503 if (IS_ERR(capi_class)) { 1503 if (IS_ERR(capi_class)) {
1504 unregister_chrdev(capi_major, "capi20"); 1504 unregister_chrdev(capi_major, "capi20");
1505 return PTR_ERR(capi_class); 1505 return PTR_ERR(capi_class);
1506 } 1506 }
1507 1507
1508 class_simple_device_add(capi_class, MKDEV(capi_major, 0), NULL, "capi"); 1508 class_device_create(capi_class, MKDEV(capi_major, 0), NULL, "capi");
1509 devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, 1509 devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR,
1510 "isdn/capi20"); 1510 "isdn/capi20");
1511 1511
1512#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE 1512#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
1513 if (capinc_tty_init() < 0) { 1513 if (capinc_tty_init() < 0) {
1514 class_simple_device_remove(MKDEV(capi_major, 0)); 1514 class_device_destroy(capi_class, MKDEV(capi_major, 0));
1515 class_simple_destroy(capi_class); 1515 class_destroy(capi_class);
1516 unregister_chrdev(capi_major, "capi20"); 1516 unregister_chrdev(capi_major, "capi20");
1517 return -ENOMEM; 1517 return -ENOMEM;
1518 } 1518 }
@@ -1539,8 +1539,8 @@ static void __exit capi_exit(void)
1539{ 1539{
1540 proc_exit(); 1540 proc_exit();
1541 1541
1542 class_simple_device_remove(MKDEV(capi_major, 0)); 1542 class_device_destroy(capi_class, MKDEV(capi_major, 0));
1543 class_simple_destroy(capi_class); 1543 class_destroy(capi_class);
1544 unregister_chrdev(capi_major, "capi20"); 1544 unregister_chrdev(capi_major, "capi20");
1545 devfs_remove("isdn/capi20"); 1545 devfs_remove("isdn/capi20");
1546 1546