diff options
author | davem <davem> | 2002-01-09 01:19:29 +0000 |
---|---|---|
committer | davem <davem> | 2002-01-09 01:19:29 +0000 |
commit | db2f40212a362285c3221229ce941c06972b381b (patch) | |
tree | 939bd438ad6bcab1ce7ba19048fc6da755c080ee | |
parent | 1b0fcd5b56be7bece7dbdfdafb3adf5dba5ddd08 (diff) | |
download | netdev-vger-cvs-db2f40212a362285c3221229ce941c06972b381b.tar.gz |
Back out local 2.5.x idsn differences.
-rw-r--r-- | drivers/isdn/avmb1/capi.c | 529 | ||||
-rw-r--r-- | drivers/isdn/divert/divert_procfs.c | 23 | ||||
-rw-r--r-- | drivers/isdn/eicon/eicon.h | 2 | ||||
-rw-r--r-- | drivers/isdn/eicon/eicon_dsp.h | 2 | ||||
-rw-r--r-- | drivers/isdn/eicon/eicon_idi.c | 4 | ||||
-rw-r--r-- | drivers/isdn/eicon/eicon_idi.h | 2 | ||||
-rw-r--r-- | drivers/isdn/eicon/eicon_io.c | 2 | ||||
-rw-r--r-- | drivers/isdn/eicon/eicon_isa.c | 4 | ||||
-rw-r--r-- | drivers/isdn/eicon/eicon_isa.h | 2 | ||||
-rw-r--r-- | drivers/isdn/eicon/eicon_mod.c | 4 | ||||
-rw-r--r-- | drivers/isdn/eicon/eicon_pci.c | 4 | ||||
-rw-r--r-- | drivers/isdn/eicon/eicon_pci.h | 2 | ||||
-rw-r--r-- | drivers/isdn/hisax/st5481_init.c | 2 | ||||
-rw-r--r-- | drivers/isdn/tpam/tpam_main.c | 2 |
14 files changed, 146 insertions, 438 deletions
diff --git a/drivers/isdn/avmb1/capi.c b/drivers/isdn/avmb1/capi.c index 1559ba7fc..e50cd7c31 100644 --- a/drivers/isdn/avmb1/capi.c +++ b/drivers/isdn/avmb1/capi.c @@ -1,4 +1,4 @@ -/* $Id: capi.c,v 1.44.6.15 2001/09/28 08:05:29 kai Exp $ +/* $Id: capi.c,v 1.1.4.1.2.2 2001/12/21 15:00:17 kai Exp $ * * CAPI 2.0 Interface for Linux * @@ -29,7 +29,6 @@ #include <linux/netdevice.h> #include <linux/ppp_defs.h> #include <linux/if_ppp.h> -#undef CAPI_PPP_ON_RAW_DEVICE #endif /* CONFIG_PPP */ #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ #include <linux/skbuff.h> @@ -45,7 +44,7 @@ #include "capifs.h" #endif -static char *revision = "$Revision: 1.44.6.15 $"; +static char *revision = "$Revision: 1.1.4.1.2.2 $"; MODULE_DESCRIPTION("CAPI4Linux: Userspace /dev/capi20 interface"); MODULE_AUTHOR("Carsten Paeth"); @@ -59,13 +58,11 @@ MODULE_LICENSE("GPL"); int capi_major = 68; /* allocated */ #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE -int capi_rawmajor = 190; int capi_ttymajor = 191; #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ MODULE_PARM(capi_major, "i"); #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE -MODULE_PARM(capi_rawmajor, "i"); MODULE_PARM(capi_ttymajor, "i"); #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ @@ -83,16 +80,15 @@ struct capincci; struct capiminor; struct capiminor { - struct capiminor *next; + struct list_head list; struct capincci *nccip; unsigned int minor; - __u16 applid; - __u32 ncci; - __u16 datahandle; - __u16 msgid; + u16 applid; + u32 ncci; + u16 datahandle; + u16 msgid; - struct file *file; struct tty_struct *tty; int ttyinstop; int ttyoutstop; @@ -104,15 +100,10 @@ struct capiminor { struct sk_buff_head outqueue; int outbytes; - /* for raw device */ - struct sk_buff_head recvqueue; - wait_queue_head_t recvwait; - wait_queue_head_t sendwait; - /* transmit path */ struct datahandle_queue { struct datahandle_queue *next; - __u16 datahandle; + u16 datahandle; } *ackqueue; int nack; @@ -121,7 +112,7 @@ struct capiminor { struct capincci { struct capincci *next; - __u32 ncci; + u32 ncci; struct capidev *cdev; #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE struct capiminor *minorp; @@ -130,8 +121,8 @@ struct capincci { struct capidev { struct list_head list; - __u16 applid; - __u16 errcode; + u16 applid; + u16 errcode; unsigned userflags; struct sk_buff_head recvqueue; @@ -149,10 +140,13 @@ struct capidev { /* -------- global variables ---------------------------------------- */ static struct capi_interface *capifuncs; -static rwlock_t capidev_list_lock; + +static rwlock_t capidev_list_lock = RW_LOCK_UNLOCKED; static LIST_HEAD(capidev_list); + #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE -static struct capiminor *minors; +static rwlock_t capiminor_list_lock = RW_LOCK_UNLOCKED; +static LIST_HEAD(capiminor_list); #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ static kmem_cache_t *capidev_cachep; @@ -165,7 +159,7 @@ static kmem_cache_t *capidh_cachep; #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE /* -------- datahandles --------------------------------------------- */ -int capincci_add_ack(struct capiminor *mp, __u16 datahandle) +static int capincci_add_ack(struct capiminor *mp, u16 datahandle) { struct datahandle_queue *n, **pp; @@ -183,7 +177,7 @@ int capincci_add_ack(struct capiminor *mp, __u16 datahandle) return 0; } -int capiminor_del_ack(struct capiminor *mp, __u16 datahandle) +static int capiminor_del_ack(struct capiminor *mp, u16 datahandle) { struct datahandle_queue **pp, *p; @@ -199,7 +193,7 @@ int capiminor_del_ack(struct capiminor *mp, __u16 datahandle) return -1; } -void capiminor_del_all_ack(struct capiminor *mp) +static void capiminor_del_all_ack(struct capiminor *mp) { struct datahandle_queue **pp, *p; @@ -215,16 +209,18 @@ void capiminor_del_all_ack(struct capiminor *mp) /* -------- struct capiminor ---------------------------------------- */ -struct capiminor *capiminor_alloc(__u16 applid, __u32 ncci) +static struct capiminor *capiminor_alloc(u16 applid, u32 ncci) { - struct capiminor *mp, **pp; - unsigned int minor = 0; - - MOD_INC_USE_COUNT; - mp = (struct capiminor *)kmem_cache_alloc(capiminor_cachep, GFP_ATOMIC); - if (!mp) { - MOD_DEC_USE_COUNT; - printk(KERN_ERR "capi: can't alloc capiminor\n"); + struct capiminor *mp, *p; + struct list_head *l; + unsigned int minor = 0; + unsigned long flags; + + MOD_INC_USE_COUNT; + mp = kmem_cache_alloc(capiminor_cachep, GFP_ATOMIC); + if (!mp) { + MOD_DEC_USE_COUNT; + printk(KERN_ERR "capi: can't alloc capiminor\n"); return 0; } #ifdef _DEBUG_REFCOUNT @@ -239,61 +235,66 @@ struct capiminor *capiminor_alloc(__u16 applid, __u32 ncci) skb_queue_head_init(&mp->inqueue); skb_queue_head_init(&mp->outqueue); - skb_queue_head_init(&mp->recvqueue); - init_waitqueue_head(&mp->recvwait); - init_waitqueue_head(&mp->sendwait); - - for (pp = &minors; *pp; pp = &(*pp)->next) { - if ((*pp)->minor < minor) - continue; - if ((*pp)->minor > minor) + write_lock_irqsave(&capiminor_list_lock, flags); + list_for_each(l, &capiminor_list) { + p = list_entry(l, struct capiminor, list); + if (p->minor > minor) { + mp->minor = minor; + list_add_tail(&mp->list, &p->list); break; + } minor++; } - mp->minor = minor; - mp->next = *pp; - *pp = mp; + write_unlock_irqrestore(&capiminor_list_lock, flags); + if (l == &capiminor_list) { + kfree(mp); + return NULL; + } return mp; } -void capiminor_free(struct capiminor *mp) +static void capiminor_free(struct capiminor *mp) { - struct capiminor **pp; + unsigned long flags; - pp = &minors; - while (*pp) { - if (*pp == mp) { - *pp = (*pp)->next; - if (mp->ttyskb) kfree_skb(mp->ttyskb); - mp->ttyskb = 0; - skb_queue_purge(&mp->recvqueue); - skb_queue_purge(&mp->inqueue); - skb_queue_purge(&mp->outqueue); - capiminor_del_all_ack(mp); - kmem_cache_free(capiminor_cachep, mp); - MOD_DEC_USE_COUNT; + write_lock_irqsave(&capiminor_list_lock, flags); + list_del(&mp->list); + write_unlock_irqrestore(&capiminor_list_lock, flags); + + if (mp->ttyskb) kfree_skb(mp->ttyskb); + mp->ttyskb = 0; + skb_queue_purge(&mp->inqueue); + skb_queue_purge(&mp->outqueue); + capiminor_del_all_ack(mp); + kmem_cache_free(capiminor_cachep, mp); + MOD_DEC_USE_COUNT; #ifdef _DEBUG_REFCOUNT - printk(KERN_DEBUG "capiminor_free %d\n", GET_USE_COUNT(THIS_MODULE)); + printk(KERN_DEBUG "capiminor_free %d\n", GET_USE_COUNT(THIS_MODULE)); #endif - return; - } else { - pp = &(*pp)->next; - } - } } struct capiminor *capiminor_find(unsigned int minor) { - struct capiminor *p; - for (p = minors; p && p->minor != minor; p = p->next) - ; + struct list_head *l; + struct capiminor *p = NULL; + + read_lock(&capiminor_list_lock); + list_for_each(l, &capiminor_list) { + p = list_entry(l, struct capiminor, list); + if (p->minor == minor) + break; + } + read_unlock(&capiminor_list_lock); + if (l == &capiminor_list) + return NULL; + return p; } #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ /* -------- struct capincci ----------------------------------------- */ -static struct capincci *capincci_alloc(struct capidev *cdev, __u32 ncci) +static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci) { struct capincci *np, **pp; #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE @@ -317,8 +318,6 @@ static struct capincci *capincci_alloc(struct capidev *cdev, __u32 ncci) printk(KERN_DEBUG "set mp->nccip\n"); #endif #if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE) - kdev = mk_kdev(capi_rawmajor, mp->minor); - capifs_new_ncci('r', mp->minor, kdev); kdev = mk_kdev(capi_ttymajor, mp->minor); capifs_new_ncci(0, mp->minor, kdev); #endif @@ -330,7 +329,7 @@ static struct capincci *capincci_alloc(struct capidev *cdev, __u32 ncci) return np; } -static void capincci_free(struct capidev *cdev, __u32 ncci) +static void capincci_free(struct capidev *cdev, u32 ncci) { struct capincci *np, **pp; #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE @@ -354,13 +353,6 @@ static void capincci_free(struct capidev *cdev, __u32 ncci) printk(KERN_DEBUG "reset mp->nccip\n"); #endif tty_hangup(mp->tty); - } else if (mp->file) { - mp->nccip = 0; -#ifdef _DEBUG_REFCOUNT - printk(KERN_DEBUG "reset mp->nccip\n"); -#endif - wake_up_interruptible(&mp->recvwait); - wake_up_interruptible(&mp->sendwait); } else { capiminor_free(mp); } @@ -374,7 +366,7 @@ static void capincci_free(struct capidev *cdev, __u32 ncci) } } -struct capincci *capincci_find(struct capidev *cdev, __u32 ncci) +static struct capincci *capincci_find(struct capidev *cdev, u32 ncci) { struct capincci *p; @@ -387,12 +379,12 @@ struct capincci *capincci_find(struct capidev *cdev, __u32 ncci) /* -------- struct capidev ------------------------------------------ */ -static struct capidev *capidev_alloc(struct file *file) +static struct capidev *capidev_alloc(void) { struct capidev *cdev; unsigned long flags; - cdev = (struct capidev *)kmem_cache_alloc(capidev_cachep, GFP_KERNEL); + cdev = kmem_cache_alloc(capidev_cachep, GFP_KERNEL); if (!cdev) return 0; memset(cdev, 0, sizeof(struct capidev)); @@ -412,14 +404,16 @@ static void capidev_free(struct capidev *cdev) if (cdev->applid) (*capifuncs->capi_release) (cdev->applid); cdev->applid = 0; + skb_queue_purge(&cdev->recvqueue); + write_lock_irqsave(&capidev_list_lock, flags); list_del(&cdev->list); write_unlock_irqrestore(&capidev_list_lock, flags); kmem_cache_free(capidev_cachep, cdev); } -static struct capidev *capidev_find(__u16 applid) +static struct capidev *capidev_find(u16 applid) { // FIXME this doesn't guarantee that the device won't go away shortly struct list_head *l; @@ -442,13 +436,13 @@ static struct capidev *capidev_find(__u16 applid) #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE /* -------- handle data queue --------------------------------------- */ -struct sk_buff * +static struct sk_buff * gen_data_b3_resp_for(struct capiminor *mp, struct sk_buff *skb) { struct sk_buff *nskb; nskb = alloc_skb(CAPI_DATA_B3_RESP_LEN, GFP_ATOMIC); if (nskb) { - __u16 datahandle = CAPIMSG_U16(skb->data,CAPIMSG_BASELEN+4+4+2); + u16 datahandle = CAPIMSG_U16(skb->data,CAPIMSG_BASELEN+4+4+2); unsigned char *s = skb_put(nskb, CAPI_DATA_B3_RESP_LEN); capimsg_setu16(s, 0, CAPI_DATA_B3_RESP_LEN); capimsg_setu16(s, 2, mp->applid); @@ -461,11 +455,11 @@ gen_data_b3_resp_for(struct capiminor *mp, struct sk_buff *skb) return nskb; } -int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb) +static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb) { struct sk_buff *nskb; unsigned int datalen; - __u16 errcode, datahandle; + u16 errcode, datahandle; datalen = skb->len - CAPIMSG_LEN(skb->data); if (mp->tty) { @@ -507,33 +501,6 @@ int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb) kfree_skb(skb); return 0; - } else if (mp->file) { - if (skb_queue_len(&mp->recvqueue) > CAPINC_MAX_RECVQUEUE) { -#if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS) - printk(KERN_DEBUG "capi: no room in raw queue\n"); -#endif - return -1; - } - if ((nskb = gen_data_b3_resp_for(mp, skb)) == 0) { - printk(KERN_ERR "capi: gen_data_b3_resp failed\n"); - return -1; - } - datahandle = CAPIMSG_U16(skb->data,CAPIMSG_BASELEN+4); - errcode = (*capifuncs->capi_put_message)(mp->applid, nskb); - if (errcode != CAPI_NOERROR) { - printk(KERN_ERR "capi: send DATA_B3_RESP failed=%x\n", - errcode); - kfree_skb(nskb); - return -1; - } - (void)skb_pull(skb, CAPIMSG_LEN(skb->data)); -#ifdef _DEBUG_DATAFLOW - printk(KERN_DEBUG "capi: DATA_B3_RESP %u len=%d => raw\n", - datahandle, skb->len); -#endif - skb_queue_tail(&mp->recvqueue, skb); - wake_up_interruptible(&mp->recvwait); - return 0; } #ifdef _DEBUG_DATAFLOW printk(KERN_DEBUG "capi: currently no receiver\n"); @@ -541,7 +508,7 @@ int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb) return -1; } -void handle_minor_recv(struct capiminor *mp) +static void handle_minor_recv(struct capiminor *mp) { struct sk_buff *skb; while ((skb = skb_dequeue(&mp->inqueue)) != 0) { @@ -555,13 +522,13 @@ void handle_minor_recv(struct capiminor *mp) } } -int handle_minor_send(struct capiminor *mp) +static int handle_minor_send(struct capiminor *mp) { struct sk_buff *skb; - __u16 len; + u16 len; int count = 0; - __u16 errcode; - __u16 datahandle; + u16 errcode; + u16 datahandle; if (mp->tty && mp->ttyoutstop) { #if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS) @@ -572,7 +539,7 @@ int handle_minor_send(struct capiminor *mp) while ((skb = skb_dequeue(&mp->outqueue)) != 0) { datahandle = mp->datahandle; - len = (__u16)skb->len; + len = (u16)skb->len; skb_push(skb, CAPI_DATA_B3_REQ_LEN); memset(skb->data, 0, CAPI_DATA_B3_REQ_LEN); capimsg_setu16(skb->data, 0, CAPI_DATA_B3_REQ_LEN); @@ -581,7 +548,7 @@ int handle_minor_send(struct capiminor *mp) capimsg_setu8 (skb->data, 5, CAPI_REQ); capimsg_setu16(skb->data, 6, mp->msgid++); capimsg_setu32(skb->data, 8, mp->ncci); /* NCCI */ - capimsg_setu32(skb->data, 12, (__u32) skb->data); /* Data32 */ + capimsg_setu32(skb->data, 12, (u32) skb->data); /* Data32 */ capimsg_setu16(skb->data, 16, len); /* Data length */ capimsg_setu16(skb->data, 18, datahandle); capimsg_setu16(skb->data, 20, 0); /* Flags */ @@ -615,24 +582,22 @@ int handle_minor_send(struct capiminor *mp) mp->outbytes -= len; kfree_skb(skb); } - if (count) - wake_up_interruptible(&mp->sendwait); return count; } #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ /* -------- function called by lower level -------------------------- */ -static void capi_signal(__u16 applid, void *param) +static void capi_signal(u16 applid, void *param) { struct capidev *cdev = (struct capidev *)param; #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE struct capiminor *mp; - __u16 datahandle; + u16 datahandle; #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ struct capincci *np; struct sk_buff *skb = 0; - __u32 ncci; + u32 ncci; (void) (*capifuncs->capi_get_message) (applid, &skb); if (!skb) { @@ -689,8 +654,6 @@ static void capi_signal(__u16 applid, void *param) if (mp->tty) { if (mp->tty->ldisc.write_wakeup) mp->tty->ldisc.write_wakeup(mp->tty); - } else { - wake_up_interruptible(&mp->sendwait); } (void)handle_minor_send(mp); @@ -761,7 +724,7 @@ capi_write(struct file *file, const char *buf, size_t count, loff_t *ppos) struct capidev *cdev = (struct capidev *)file->private_data; struct sk_buff *skb; int retval; - __u16 mlen; + u16 mlen; if (ppos != &file->f_pos) return -ESPIPE; @@ -1001,14 +964,12 @@ capi_ioctl(struct inode *inode, struct file *file, sizeof(ncci)); if (retval) return -EFAULT; - nccip = capincci_find(cdev, (__u32) ncci); + nccip = capincci_find(cdev, (u32) ncci); if (!nccip) return 0; #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE if ((mp = nccip->minorp) != 0) { count += atomic_read(&mp->ttyopencount); - if (mp->file) - count++; } #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ return count; @@ -1026,7 +987,7 @@ capi_ioctl(struct inode *inode, struct file *file, sizeof(ncci)); if (retval) return -EFAULT; - nccip = capincci_find(cdev, (__u32) ncci); + nccip = capincci_find(cdev, (u32) ncci); if (!nccip || (mp = nccip->minorp) == 0) return -ESRCH; return mp->minor; @@ -1043,13 +1004,9 @@ capi_open(struct inode *inode, struct file *file) if (file->private_data) return -EEXIST; - if ((file->private_data = capidev_alloc(file)) == 0) + if ((file->private_data = capidev_alloc()) == 0) return -ENOMEM; - MOD_INC_USE_COUNT; -#ifdef _DEBUG_REFCOUNT - printk(KERN_DEBUG "capi_open %d\n", GET_USE_COUNT(THIS_MODULE)); -#endif return 0; } @@ -1058,16 +1015,10 @@ capi_release(struct inode *inode, struct file *file) { struct capidev *cdev = (struct capidev *)file->private_data; - lock_kernel(); capincci_free(cdev, 0xffffffff); capidev_free(cdev); file->private_data = NULL; - MOD_DEC_USE_COUNT; -#ifdef _DEBUG_REFCOUNT - printk(KERN_DEBUG "capi_release %d\n", GET_USE_COUNT(THIS_MODULE)); -#endif - unlock_kernel(); return 0; } @@ -1084,198 +1035,9 @@ static struct file_operations capi_fops = }; #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE -/* -------- file_operations for capincci ---------------------------- */ - -static int -capinc_raw_open(struct inode *inode, struct file *file) -{ - struct capiminor *mp; - - if (file->private_data) - return -EEXIST; - if ((mp = capiminor_find(minor(file->f_dentry->d_inode->i_rdev))) == 0) - return -ENXIO; - if (mp->nccip == 0) - return -ENXIO; - if (mp->file) - return -EBUSY; - -#ifdef _DEBUG_REFCOUNT - printk(KERN_DEBUG "capi_raw_open %d\n", GET_USE_COUNT(THIS_MODULE)); -#endif - - mp->datahandle = 0; - mp->file = file; - file->private_data = (void *)mp; - handle_minor_recv(mp); - return 0; -} - -static ssize_t -capinc_raw_read(struct file *file, char *buf, size_t count, loff_t *ppos) -{ - struct capiminor *mp = (struct capiminor *)file->private_data; - struct sk_buff *skb; - int retval; - size_t copied = 0; - - if (ppos != &file->f_pos) - return -ESPIPE; - - if (!mp || !mp->nccip) - return -EINVAL; - - if ((skb = skb_dequeue(&mp->recvqueue)) == 0) { - - if (file->f_flags & O_NONBLOCK) - return -EAGAIN; - - for (;;) { - interruptible_sleep_on(&mp->recvwait); - if (mp->nccip == 0) - return 0; - if ((skb = skb_dequeue(&mp->recvqueue)) != 0) - break; - if (signal_pending(current)) - break; - } - if (skb == 0) - return -ERESTARTNOHAND; - } - do { - if (count < skb->len) { - retval = copy_to_user(buf, skb->data, count); - if (retval) { - skb_queue_head(&mp->recvqueue, skb); - return retval; - } - skb_pull(skb, count); - skb_queue_head(&mp->recvqueue, skb); - copied += count; - return copied; - } else { - retval = copy_to_user(buf, skb->data, skb->len); - if (retval) { - skb_queue_head(&mp->recvqueue, skb); - return copied; - } - copied += skb->len; - count -= skb->len; - buf += skb->len; - kfree_skb(skb); - } - } while ((skb = skb_dequeue(&mp->recvqueue)) != 0); - - return copied; -} - -static ssize_t -capinc_raw_write(struct file *file, const char *buf, size_t count, loff_t *ppos) -{ - struct capiminor *mp = (struct capiminor *)file->private_data; - struct sk_buff *skb; - int retval; - - if (ppos != &file->f_pos) - return -ESPIPE; - - if (!mp || !mp->nccip) - return -EINVAL; - - skb = alloc_skb(CAPI_DATA_B3_REQ_LEN+count, GFP_USER); - if (!skb) - return -ENOMEM; - - skb_reserve(skb, CAPI_DATA_B3_REQ_LEN); - if ((retval = copy_from_user(skb_put(skb, count), buf, count))) { - kfree_skb(skb); - return -EFAULT; - } - - while (skb_queue_len(&mp->outqueue) > CAPINC_MAX_SENDQUEUE) { - if (file->f_flags & O_NONBLOCK) - return -EAGAIN; - interruptible_sleep_on(&mp->sendwait); - if (mp->nccip == 0) { - kfree_skb(skb); - return -EIO; - } - if (signal_pending(current)) - return -ERESTARTNOHAND; - } - skb_queue_tail(&mp->outqueue, skb); - mp->outbytes += skb->len; - (void)handle_minor_send(mp); - return count; -} - -static unsigned int -capinc_raw_poll(struct file *file, poll_table * wait) -{ - struct capiminor *mp = (struct capiminor *)file->private_data; - unsigned int mask = 0; - - if (!mp || !mp->nccip) - return POLLERR|POLLHUP; - - poll_wait(file, &(mp->recvwait), wait); - if (!skb_queue_empty(&mp->recvqueue)) - mask |= POLLIN | POLLRDNORM; - poll_wait(file, &(mp->sendwait), wait); - if (skb_queue_len(&mp->outqueue) > CAPINC_MAX_SENDQUEUE) - mask = POLLOUT | POLLWRNORM; - return mask; -} - -static int -capinc_raw_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - struct capiminor *mp = (struct capiminor *)file->private_data; - if (!mp || !mp->nccip) - return -EINVAL; - - switch (cmd) { - } - return -EINVAL; -} - -static int -capinc_raw_release(struct inode *inode, struct file *file) -{ - struct capiminor *mp = (struct capiminor *)file->private_data; - - if (mp) { - lock_kernel(); - mp->file = 0; - if (mp->nccip == 0) { - capiminor_free(mp); - file->private_data = NULL; - } - unlock_kernel(); - } - -#ifdef _DEBUG_REFCOUNT - printk(KERN_DEBUG "capinc_raw_release %d\n", GET_USE_COUNT(THIS_MODULE)); -#endif - return 0; -} - -static struct file_operations capinc_raw_fops = -{ - owner: THIS_MODULE, - llseek: no_llseek, - read: capinc_raw_read, - write: capinc_raw_write, - poll: capinc_raw_poll, - ioctl: capinc_raw_ioctl, - open: capinc_raw_open, - release: capinc_raw_release, -}; - /* -------- tty_operations for capincci ----------------------------- */ -int capinc_tty_open(struct tty_struct * tty, struct file * file) +static int capinc_tty_open(struct tty_struct * tty, struct file * file) { struct capiminor *mp; @@ -1283,12 +1045,7 @@ int capinc_tty_open(struct tty_struct * tty, struct file * file) return -ENXIO; if (mp->nccip == 0) return -ENXIO; - if (mp->file) - return -EBUSY; - skb_queue_head_init(&mp->recvqueue); - init_waitqueue_head(&mp->recvwait); - init_waitqueue_head(&mp->sendwait); tty->driver_data = (void *)mp; #ifdef _DEBUG_REFCOUNT printk(KERN_DEBUG "capi_tty_open %d\n", GET_USE_COUNT(THIS_MODULE)); @@ -1303,7 +1060,7 @@ int capinc_tty_open(struct tty_struct * tty, struct file * file) return 0; } -void capinc_tty_close(struct tty_struct * tty, struct file * file) +static void capinc_tty_close(struct tty_struct * tty, struct file * file) { struct capiminor *mp; @@ -1328,8 +1085,8 @@ void capinc_tty_close(struct tty_struct * tty, struct file * file) #endif } -int capinc_tty_write(struct tty_struct * tty, int from_user, - const unsigned char *buf, int count) +static int capinc_tty_write(struct tty_struct * tty, int from_user, + const unsigned char *buf, int count) { struct capiminor *mp = (struct capiminor *)tty->driver_data; struct sk_buff *skb; @@ -1380,7 +1137,7 @@ int capinc_tty_write(struct tty_struct * tty, int from_user, return count; } -void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch) +static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch) { struct capiminor *mp = (struct capiminor *)tty->driver_data; struct sk_buff *skb; @@ -1417,7 +1174,7 @@ void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch) } } -void capinc_tty_flush_chars(struct tty_struct *tty) +static void capinc_tty_flush_chars(struct tty_struct *tty) { struct capiminor *mp = (struct capiminor *)tty->driver_data; struct sk_buff *skb; @@ -1443,7 +1200,7 @@ void capinc_tty_flush_chars(struct tty_struct *tty) (void)handle_minor_recv(mp); } -int capinc_tty_write_room(struct tty_struct *tty) +static int capinc_tty_write_room(struct tty_struct *tty) { struct capiminor *mp = (struct capiminor *)tty->driver_data; int room; @@ -1479,7 +1236,7 @@ int capinc_tty_chars_in_buffer(struct tty_struct *tty) return mp->outbytes; } -int capinc_tty_ioctl(struct tty_struct *tty, struct file * file, +static int capinc_tty_ioctl(struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg) { int error = 0; @@ -1491,14 +1248,14 @@ int capinc_tty_ioctl(struct tty_struct *tty, struct file * file, return error; } -void capinc_tty_set_termios(struct tty_struct *tty, struct termios * old) +static void capinc_tty_set_termios(struct tty_struct *tty, struct termios * old) { #ifdef _DEBUG_TTYFUNCS printk(KERN_DEBUG "capinc_tty_set_termios\n"); #endif } -void capinc_tty_throttle(struct tty_struct * tty) +static void capinc_tty_throttle(struct tty_struct * tty) { struct capiminor *mp = (struct capiminor *)tty->driver_data; #ifdef _DEBUG_TTYFUNCS @@ -1508,7 +1265,7 @@ void capinc_tty_throttle(struct tty_struct * tty) mp->ttyinstop = 1; } -void capinc_tty_unthrottle(struct tty_struct * tty) +static void capinc_tty_unthrottle(struct tty_struct * tty) { struct capiminor *mp = (struct capiminor *)tty->driver_data; #ifdef _DEBUG_TTYFUNCS @@ -1520,7 +1277,7 @@ void capinc_tty_unthrottle(struct tty_struct * tty) } } -void capinc_tty_stop(struct tty_struct *tty) +static void capinc_tty_stop(struct tty_struct *tty) { struct capiminor *mp = (struct capiminor *)tty->driver_data; #ifdef _DEBUG_TTYFUNCS @@ -1531,7 +1288,7 @@ void capinc_tty_stop(struct tty_struct *tty) } } -void capinc_tty_start(struct tty_struct *tty) +static void capinc_tty_start(struct tty_struct *tty) { struct capiminor *mp = (struct capiminor *)tty->driver_data; #ifdef _DEBUG_TTYFUNCS @@ -1543,49 +1300,43 @@ void capinc_tty_start(struct tty_struct *tty) } } -void capinc_tty_hangup(struct tty_struct *tty) +static void capinc_tty_hangup(struct tty_struct *tty) { #ifdef _DEBUG_TTYFUNCS printk(KERN_DEBUG "capinc_tty_hangup\n"); #endif } -void capinc_tty_break_ctl(struct tty_struct *tty, int state) +static void capinc_tty_break_ctl(struct tty_struct *tty, int state) { #ifdef _DEBUG_TTYFUNCS printk(KERN_DEBUG "capinc_tty_break_ctl(%d)\n", state); #endif } -void capinc_tty_flush_buffer(struct tty_struct *tty) +static void capinc_tty_flush_buffer(struct tty_struct *tty) { #ifdef _DEBUG_TTYFUNCS printk(KERN_DEBUG "capinc_tty_flush_buffer\n"); #endif } -void capinc_tty_set_ldisc(struct tty_struct *tty) +static void capinc_tty_set_ldisc(struct tty_struct *tty) { #ifdef _DEBUG_TTYFUNCS printk(KERN_DEBUG "capinc_tty_set_ldisc\n"); #endif } -void capinc_tty_send_xchar(struct tty_struct *tty, char ch) +static void capinc_tty_send_xchar(struct tty_struct *tty, char ch) { #ifdef _DEBUG_TTYFUNCS printk(KERN_DEBUG "capinc_tty_send_xchar(%d)\n", ch); #endif } -int capinc_tty_read_proc(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - return 0; -} - -int capinc_write_proc(struct file *file, const char *buffer, - unsigned long count, void *data) +static int capinc_tty_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) { return 0; } @@ -1597,7 +1348,7 @@ static struct tty_struct *capinc_tty_table[CAPINC_NR_PORTS]; static struct termios *capinc_tty_termios[CAPINC_NR_PORTS]; static struct termios *capinc_tty_termios_locked[CAPINC_NR_PORTS]; -int capinc_tty_init(void) +static int capinc_tty_init(void) { struct tty_driver *drv = &capinc_tty_driver; @@ -1655,7 +1406,7 @@ int capinc_tty_init(void) return 0; } -void capinc_tty_exit(void) +static void capinc_tty_exit(void) { struct tty_driver *drv = &capinc_tty_driver; int retval; @@ -1721,14 +1472,9 @@ static int proc_capincci_read_proc(char *page, char **start, off_t off, list_for_each(l, &capidev_list) { cdev = list_entry(l, struct capidev, list); for (np=cdev->nccis; np; np = np->next) { - len += sprintf(page+len, "%d 0x%x%s\n", - cdev->applid, - np->ncci, -#ifndef CONFIG_ISDN_CAPI_MIDDLEWARE - ""); -#else /* CONFIG_ISDN_CAPI_MIDDLEWARE */ - np->minorp && np->minorp->file ? " open" : ""); -#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ + len += sprintf(page+len, "%d 0x%x\n", + cdev->applid, + np->ncci); if (len <= off) { off -= len; len = 0; @@ -1855,7 +1601,7 @@ static int __init alloc_init(void) return 0; } -static void lower_callback(unsigned int cmd, __u32 contr, void *data) +static void lower_callback(unsigned int cmd, u32 contr, void *data) { struct capi_ncciinfo *np; struct capidev *cdev; @@ -1910,19 +1656,6 @@ static int __init capi_init(void) return -EIO; } -#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE - if (devfs_register_chrdev(capi_rawmajor, "capi/r%d", &capinc_raw_fops)) { - devfs_unregister_chrdev(capi_major, "capi20"); - printk(KERN_ERR "capi20: unable to get major %d\n", capi_rawmajor); - MOD_DEC_USE_COUNT; - return -EIO; - } - devfs_register_series (NULL, "capi/r%u", CAPINC_NR_PORTS, - DEVFS_FL_DEFAULT, - capi_rawmajor, 0, - S_IFCHR | S_IRUSR | S_IWUSR, - &capinc_raw_fops, NULL); -#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ devfs_register (NULL, "isdn/capi20", DEVFS_FL_DEFAULT, capi_major, 0, S_IFCHR | S_IRUSR | S_IWUSR, &capi_fops, NULL); @@ -1932,9 +1665,6 @@ static int __init capi_init(void) MOD_DEC_USE_COUNT; devfs_unregister_chrdev(capi_major, "capi20"); -#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE - devfs_unregister_chrdev(capi_rawmajor, "capi/r%d"); -#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ devfs_unregister(devfs_find_handle(NULL, "capi20", capi_major, 0, DEVFS_SPECIAL_CHR, 0)); @@ -1945,7 +1675,6 @@ static int __init capi_init(void) if (capinc_tty_init() < 0) { (void) detach_capi_interface(&cuser); devfs_unregister_chrdev(capi_major, "capi20"); - devfs_unregister_chrdev(capi_rawmajor, "capi/r%d"); MOD_DEC_USE_COUNT; return -ENOMEM; } @@ -1953,13 +1682,6 @@ static int __init capi_init(void) if (alloc_init() < 0) { #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE - unsigned int j; - devfs_unregister_chrdev(capi_rawmajor, "capi/r%d"); - for (j = 0; j < CAPINC_NR_PORTS; j++) { - char devname[32]; - sprintf(devname, "capi/r%u", j); - devfs_unregister(devfs_find_handle(NULL, devname, capi_rawmajor, j, DEVFS_SPECIAL_CHR, 0)); - } capinc_tty_exit(); #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ (void) detach_capi_interface(&cuser); @@ -1991,9 +1713,6 @@ static int __init capi_init(void) static void __exit capi_exit(void) { -#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE - unsigned int j; -#endif alloc_exit(); (void)proc_exit(); @@ -2002,12 +1721,6 @@ static void __exit capi_exit(void) #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE capinc_tty_exit(); - devfs_unregister_chrdev(capi_rawmajor, "capi/r%d"); - for (j = 0; j < CAPINC_NR_PORTS; j++) { - char devname[32]; - sprintf(devname, "capi/r%u", j); - devfs_unregister(devfs_find_handle(NULL, devname, capi_rawmajor, j, DEVFS_SPECIAL_CHR, 0)); - } #endif (void) detach_capi_interface(&cuser); printk(KERN_NOTICE "capi: Rev %s: unloaded\n", rev); diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index ce1a5cb85..556223f4e 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c @@ -29,6 +29,7 @@ ulong if_used = 0; /* number of interface users */ static struct divert_info *divert_info_head = NULL; /* head of queue */ static struct divert_info *divert_info_tail = NULL; /* pointer to last entry */ +static spinlock_t divert_info_lock = SPIN_LOCK_UNLOCKED;/* lock for queue */ static wait_queue_head_t rd_queue; /*********************************/ @@ -50,15 +51,13 @@ put_info_buffer(char *cp) return; /* no memory */ strcpy(ib->info_start, cp); /* set output string */ ib->next = NULL; - save_flags(flags); - cli(); + spin_lock_irqsave( &divert_info_lock, flags ); ib->usage_cnt = if_used; if (!divert_info_head) divert_info_head = ib; /* new head */ else divert_info_tail->next = ib; /* follows existing messages */ divert_info_tail = ib; /* new tail */ - restore_flags(flags); /* delete old entrys */ while (divert_info_head->next) { @@ -70,6 +69,7 @@ put_info_buffer(char *cp) } else break; } /* divert_info_head->next */ + spin_unlock_irqrestore( &divert_info_lock, flags ); wake_up_interruptible(&(rd_queue)); } /* put_info_buffer */ @@ -135,17 +135,14 @@ isdn_divert_open(struct inode *ino, struct file *filep) { unsigned long flags; - lock_kernel(); - save_flags(flags); - cli(); - if_used++; + spin_lock_irqsave( &divert_info_lock, flags ); + if_used++; if (divert_info_head) (struct divert_info **) filep->private_data = &(divert_info_tail->next); else (struct divert_info **) filep->private_data = &divert_info_head; - restore_flags(flags); + spin_unlock_irqrestore( &divert_info_lock, flags ); /* start_divert(); */ - unlock_kernel(); return (0); } /* isdn_divert_open */ @@ -158,23 +155,20 @@ isdn_divert_close(struct inode *ino, struct file *filep) struct divert_info *inf; unsigned long flags; - lock_kernel(); - save_flags(flags); - cli(); + spin_lock_irqsave( &divert_info_lock, flags ); if_used--; inf = *((struct divert_info **) filep->private_data); while (inf) { inf->usage_cnt--; inf = inf->next; } - restore_flags(flags); if (if_used <= 0) while (divert_info_head) { inf = divert_info_head; divert_info_head = divert_info_head->next; kfree(inf); } - unlock_kernel(); + spin_unlock_irqrestore( &divert_info_lock, flags ); return (0); } /* isdn_divert_close */ @@ -267,6 +261,7 @@ isdn_divert_ioctl(struct inode *inode, struct file *file, #ifdef CONFIG_PROC_FS static struct file_operations isdn_fops = { + owner: THIS_MODULE, llseek: no_llseek, read: isdn_divert_read, write: isdn_divert_write, diff --git a/drivers/isdn/eicon/eicon.h b/drivers/isdn/eicon/eicon.h index 5ab44971c..8d9c5acb6 100644 --- a/drivers/isdn/eicon/eicon.h +++ b/drivers/isdn/eicon/eicon.h @@ -1,4 +1,4 @@ -/* $Id: eicon.h,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $ +/* $Id: eicon.h,v 1.23.6.5 2001/09/23 22:24:37 kai Exp $ * * ISDN low-level module for Eicon active ISDN-Cards. * diff --git a/drivers/isdn/eicon/eicon_dsp.h b/drivers/isdn/eicon/eicon_dsp.h index 8cac8ffa8..2ccfeb0fb 100644 --- a/drivers/isdn/eicon/eicon_dsp.h +++ b/drivers/isdn/eicon/eicon_dsp.h @@ -1,4 +1,4 @@ -/* $Id: eicon_dsp.h,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $ +/* $Id: eicon_dsp.h,v 1.7.6.1 2001/09/23 22:24:37 kai Exp $ * * ISDN lowlevel-module for Eicon active cards. * DSP definitions diff --git a/drivers/isdn/eicon/eicon_idi.c b/drivers/isdn/eicon/eicon_idi.c index 5c6f2ac38..b44cc2ba6 100644 --- a/drivers/isdn/eicon/eicon_idi.c +++ b/drivers/isdn/eicon/eicon_idi.c @@ -1,4 +1,4 @@ -/* $Id: eicon_idi.c,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $ +/* $Id: eicon_idi.c,v 1.41.6.4 2001/11/06 20:58:29 kai Exp $ * * ISDN lowlevel-module for Eicon active cards. * IDI interface @@ -25,7 +25,7 @@ #undef EICON_FULL_SERVICE_OKTETT -char *eicon_idi_revision = "$Revision: 1.1.4.1 $"; +char *eicon_idi_revision = "$Revision: 1.41.6.4 $"; eicon_manifbuf *manbuf; diff --git a/drivers/isdn/eicon/eicon_idi.h b/drivers/isdn/eicon/eicon_idi.h index eefa56eb4..c0cab657b 100644 --- a/drivers/isdn/eicon/eicon_idi.h +++ b/drivers/isdn/eicon/eicon_idi.h @@ -1,4 +1,4 @@ -/* $Id: eicon_idi.h,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $ +/* $Id: eicon_idi.h,v 1.11.6.1 2001/09/23 22:24:37 kai Exp $ * * ISDN lowlevel-module for the Eicon active cards. * IDI-Interface diff --git a/drivers/isdn/eicon/eicon_io.c b/drivers/isdn/eicon/eicon_io.c index cfbded538..ff61c5f10 100644 --- a/drivers/isdn/eicon/eicon_io.c +++ b/drivers/isdn/eicon/eicon_io.c @@ -1,4 +1,4 @@ -/* $Id: eicon_io.c,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $ +/* $Id: eicon_io.c,v 1.13.6.2 2001/09/23 22:24:37 kai Exp $ * * ISDN low-level module for Eicon active ISDN-Cards. * Code for communicating with hardware. diff --git a/drivers/isdn/eicon/eicon_isa.c b/drivers/isdn/eicon/eicon_isa.c index e5ae07744..a925d1f3e 100644 --- a/drivers/isdn/eicon/eicon_isa.c +++ b/drivers/isdn/eicon/eicon_isa.c @@ -1,4 +1,4 @@ -/* $Id: eicon_isa.c,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $ +/* $Id: eicon_isa.c,v 1.16.6.2 2001/11/06 20:58:29 kai Exp $ * * ISDN low-level module for Eicon active ISDN-Cards. * Hardware-specific code for old ISA cards. @@ -20,7 +20,7 @@ #define release_shmem release_region #define request_shmem request_region -char *eicon_isa_revision = "$Revision: 1.1.4.1 $"; +char *eicon_isa_revision = "$Revision: 1.16.6.2 $"; #undef EICON_MCA_DEBUG diff --git a/drivers/isdn/eicon/eicon_isa.h b/drivers/isdn/eicon/eicon_isa.h index 9379af626..7502aabec 100644 --- a/drivers/isdn/eicon/eicon_isa.h +++ b/drivers/isdn/eicon/eicon_isa.h @@ -1,4 +1,4 @@ -/* $Id: eicon_isa.h,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $ +/* $Id: eicon_isa.h,v 1.10.6.1 2001/09/23 22:24:37 kai Exp $ * * ISDN low-level module for Eicon active ISDN-Cards. * diff --git a/drivers/isdn/eicon/eicon_mod.c b/drivers/isdn/eicon/eicon_mod.c index ea424191e..c0f818d0c 100644 --- a/drivers/isdn/eicon/eicon_mod.c +++ b/drivers/isdn/eicon/eicon_mod.c @@ -1,4 +1,4 @@ -/* $Id: eicon_mod.c,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $ +/* $Id: eicon_mod.c,v 1.37.6.6 2001/09/23 22:24:37 kai Exp $ * * ISDN lowlevel-module for Eicon active cards. * @@ -44,7 +44,7 @@ static eicon_card *cards = (eicon_card *) NULL; /* glob. var , contains start of card-list */ -static char *eicon_revision = "$Revision: 1.1.4.1 $"; +static char *eicon_revision = "$Revision: 1.37.6.6 $"; extern char *eicon_pci_revision; extern char *eicon_isa_revision; diff --git a/drivers/isdn/eicon/eicon_pci.c b/drivers/isdn/eicon/eicon_pci.c index d1dba2d5c..69c0a0b79 100644 --- a/drivers/isdn/eicon/eicon_pci.c +++ b/drivers/isdn/eicon/eicon_pci.c @@ -1,4 +1,4 @@ -/* $Id: eicon_pci.c,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $ +/* $Id: eicon_pci.c,v 1.15.6.3 2001/09/23 22:24:37 kai Exp $ * * ISDN low-level module for Eicon active ISDN-Cards. * Hardware-specific code for PCI cards. @@ -24,7 +24,7 @@ #include "adapter.h" #include "uxio.h" -char *eicon_pci_revision = "$Revision: 1.1.4.1 $"; +char *eicon_pci_revision = "$Revision: 1.15.6.3 $"; #if CONFIG_PCI /* intire stuff is only for PCI */ #ifdef CONFIG_ISDN_DRV_EICON_PCI diff --git a/drivers/isdn/eicon/eicon_pci.h b/drivers/isdn/eicon/eicon_pci.h index d87c8cacf..7e615c6f3 100644 --- a/drivers/isdn/eicon/eicon_pci.h +++ b/drivers/isdn/eicon/eicon_pci.h @@ -1,4 +1,4 @@ -/* $Id: eicon_pci.h,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $ +/* $Id: eicon_pci.h,v 1.6.6.1 2001/09/23 22:24:37 kai Exp $ * * ISDN low-level module for Eicon active ISDN-Cards (PCI part). * diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c index 8aad86d9d..28ea25bf5 100644 --- a/drivers/isdn/hisax/st5481_init.c +++ b/drivers/isdn/hisax/st5481_init.c @@ -178,7 +178,7 @@ MODULE_DEVICE_TABLE (usb, st5481_ids); static struct usb_driver st5481_usb_driver = { name: "st5481_usb", probe: probe_st5481, - disconnect: __devexit_p(disconnect_st5481), + disconnect: disconnect_st5481, id_table: st5481_ids, }; diff --git a/drivers/isdn/tpam/tpam_main.c b/drivers/isdn/tpam/tpam_main.c index 4573cad5a..9a000b3d1 100644 --- a/drivers/isdn/tpam/tpam_main.c +++ b/drivers/isdn/tpam/tpam_main.c @@ -254,7 +254,7 @@ static struct pci_driver tpam_driver = { name: "tpam", id_table: tpam_pci_tbl, probe: tpam_probe, - remove: __devexit_p(tpam_remove), + remove: tpam_remove, }; static int __init tpam_init(void) { |