]> git.neil.brown.name Git - history.git/commitdiff
ISDN: CAPI: Remove capi_interface_user etc.
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Fri, 17 May 2002 14:15:07 +0000 (09:15 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Fri, 17 May 2002 14:15:07 +0000 (09:15 -0500)
It's not used anymore, registering/unregistering just happens
on a per-application basis.

drivers/isdn/capi/capi.c
drivers/isdn/capi/capidrv.c
drivers/isdn/capi/kcapi.c
include/linux/kernelcapi.h

index 042b2d8a990c7552aebf0c2c828161863cd20b80..d73796c664ace879e660e352e7b4c3aa3340885e 100644 (file)
@@ -1594,10 +1594,6 @@ static int __init alloc_init(void)
        return 0;
 }
 
-static struct capi_interface_user cuser = {
-       name: "capi20",
-};
-
 static char rev[32];
 
 static int __init capi_init(void)
@@ -1626,11 +1622,8 @@ static int __init capi_init(void)
                        &capi_fops, NULL);
        printk(KERN_NOTICE "capi20: started up with major %d\n", capi_major);
 
-       attach_capi_interface(&cuser);
-
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
        if (capinc_tty_init() < 0) {
-               (void) detach_capi_interface(&cuser);
                devfs_unregister_chrdev(capi_major, "capi20");
                MOD_DEC_USE_COUNT;
                return -ENOMEM;
@@ -1641,7 +1634,6 @@ static int __init capi_init(void)
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
                capinc_tty_exit();
 #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
-               (void) detach_capi_interface(&cuser);
                devfs_unregister_chrdev(capi_major, "capi20");
                devfs_unregister(devfs_find_handle(NULL, "capi20",
                                                   capi_major, 0,
@@ -1679,7 +1671,6 @@ static void __exit capi_exit(void)
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
        capinc_tty_exit();
 #endif
-       (void) detach_capi_interface(&cuser);
        printk(KERN_NOTICE "capi: Rev %s: unloaded\n", rev);
 }
 
index 33fd333910c635673a35ed2a0e2efe66219179f9..c88fbb79c3ef2714d66d51ac75b44bf51cf11137 100644 (file)
@@ -2291,10 +2291,6 @@ static void __exit proc_exit(void)
     }
 }
 
-static struct capi_interface_user cuser = {
-       name: "capidrv",
-};
-
 static int __init capidrv_init(void)
 {
        struct capi_register_params rparam;
@@ -2306,8 +2302,6 @@ static int __init capidrv_init(void)
 
        MOD_INC_USE_COUNT;
 
-       attach_capi_interface(&cuser);
-
        if ((p = strchr(revision, ':')) != 0 && p[1]) {
                strncpy(rev, p + 2, sizeof(rev));
                rev[sizeof(rev)-1] = 0;
@@ -2321,7 +2315,6 @@ static int __init capidrv_init(void)
        rparam.datablklen = 2048;
        errcode = capi20_register(&rparam, &global.appid);
        if (errcode) {
-               detach_capi_interface(&cuser);
                MOD_DEC_USE_COUNT;
                return -EIO;
        }
@@ -2331,7 +2324,6 @@ static int __init capidrv_init(void)
        errcode = capi20_get_profile(0, &profile);
        if (errcode != CAPI_NOERROR) {
                capi20_release(global.appid);
-               detach_capi_interface(&cuser);
                MOD_DEC_USE_COUNT;
                return -EIO;
        }
@@ -2368,8 +2360,6 @@ static void __exit capidrv_exit(void)
 
        capi20_release(global.appid);
 
-       detach_capi_interface(&cuser);
-
        proc_exit();
 
        printk(KERN_NOTICE "capidrv: Rev%s: unloaded\n", rev);
index c97def3000f7a0abb8a4a37461ca37f289364222..40e09d311adf9a57a831b9fba7bf8a37ce631ab1 100644 (file)
@@ -96,9 +96,6 @@ static struct capi_ctr *cards[CAPI_MAXCONTR];
 static int ncards;
 static struct sk_buff_head recv_queue;
 
-static LIST_HEAD(users);
-static spinlock_t users_lock = SPIN_LOCK_UNLOCKED;
-
 static LIST_HEAD(drivers);
 static spinlock_t drivers_lock = SPIN_LOCK_UNLOCKED;
 
@@ -270,39 +267,6 @@ endloop:
        return len;
 }
 
-/*
- * /proc/capi/users:
- *     name
- */
-static int proc_users_read_proc(char *page, char **start, off_t off,
-                                       int count, int *eof, void *data)
-{
-       struct list_head *l;
-        struct capi_interface_user *cp;
-       int len = 0;
-
-       spin_lock(&users_lock);
-       list_for_each(l, &users) {
-               cp = list_entry(l, struct capi_interface_user, user_list);
-               len += sprintf(page+len, "%s\n", cp->name);
-               if (len <= off) {
-                       off -= len;
-                       len = 0;
-               } else {
-                       if (len-off > count)
-                               goto endloop;
-               }
-       }
-endloop:
-       spin_unlock(&users_lock);
-       *start = page+off;
-       if (len < count)
-               *eof = 1;
-       if (len>count) len = count;
-       if (len<0) len = 0;
-       return len;
-}
-
 /*
  * /proc/capi/controller:
  *     cnr driver cardstate name driverinfo
@@ -427,7 +391,6 @@ static struct procfsentries {
    { "capi",             S_IFDIR, 0 },
    { "capi/applications", 0     , proc_applications_read_proc },
    { "capi/driver",       0     , proc_driver_read_proc },
-   { "capi/users",       0      , proc_users_read_proc },
    { "capi/controller",   0     , proc_controller_read_proc },
    { "capi/applstats",    0     , proc_applstats_read_proc },
    { "capi/contrstats",   0     , proc_contrstats_read_proc },
@@ -1331,31 +1294,6 @@ void capi20_set_callback(u16 applid, void (*callback) (unsigned int cmd, __u32 c
 
 EXPORT_SYMBOL(capi20_set_callback);
 
-/* ------------------------------------------------------------- */
-/* -------- Exported Functions --------------------------------- */
-/* ------------------------------------------------------------- */
-
-void attach_capi_interface(struct capi_interface_user *userp)
-{
-
-       spin_lock(&users_lock);
-       list_add_tail(&userp->user_list, &users);
-       spin_unlock(&users_lock);
-       printk(KERN_NOTICE "kcapi: %s attached\n", userp->name);
-}
-
-EXPORT_SYMBOL(attach_capi_interface);
-
-void detach_capi_interface(struct capi_interface_user *userp)
-{
-       spin_lock(&users_lock);
-       list_del(&userp->user_list);
-       spin_unlock(&users_lock);
-       printk(KERN_NOTICE "kcapi: %s detached\n", userp->name);
-}
-
-EXPORT_SYMBOL(detach_capi_interface);
-
 /* ------------------------------------------------------------- */
 /* -------- Init & Cleanup ------------------------------------- */
 /* ------------------------------------------------------------- */
index 5162c2c98bc9da83b1e3cb15e0541e8c8d72f68b..1dd78feaad57995b4ba1c6b1119a8a1c1e1abd30 100644 (file)
@@ -52,15 +52,6 @@ typedef struct kcapi_carddef {
 #define        KCI_CONTRUP     0       /* struct capi_profile */
 #define        KCI_CONTRDOWN   1       /* NULL */
 
-struct capi_interface_user {
-       char name[20];
-       /* internal */
-       struct list_head user_list;
-};
-
-void attach_capi_interface(struct capi_interface_user *);
-void detach_capi_interface(struct capi_interface_user *);
-
 u16 capi20_isinstalled(void);
 u16 capi20_register(capi_register_params * rparam, u16 * applidp);
 u16 capi20_release(u16 applid);