aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/capi/capi.c34
-rw-r--r--drivers/isdn/capi/capiutil.c8
-rw-r--r--drivers/isdn/divert/divert_procfs.c1
-rw-r--r--drivers/isdn/hardware/eicon/capimain.c1
-rw-r--r--drivers/isdn/hardware/eicon/dbgioctl.h198
-rw-r--r--drivers/isdn/hardware/eicon/divamnt.c1
-rw-r--r--drivers/isdn/hardware/eicon/divasi.c1
-rw-r--r--drivers/isdn/hardware/eicon/divasmain.c1
-rw-r--r--drivers/isdn/hardware/eicon/main_if.h50
-rw-r--r--drivers/isdn/hardware/eicon/platform.h1
-rw-r--r--drivers/isdn/hisax/hfc_usb.c1
-rw-r--r--drivers/isdn/hysdn/boardergo.c2
-rw-r--r--drivers/isdn/hysdn/hysdn_proclog.c4
-rw-r--r--drivers/isdn/isdnloop/isdnloop.c2
14 files changed, 20 insertions, 285 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index db1260f73f10..81661b8bd3a8 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -18,8 +18,8 @@
18#include <linux/fcntl.h> 18#include <linux/fcntl.h>
19#include <linux/fs.h> 19#include <linux/fs.h>
20#include <linux/signal.h> 20#include <linux/signal.h>
21#include <linux/mutex.h>
21#include <linux/mm.h> 22#include <linux/mm.h>
22#include <linux/smp_lock.h>
23#include <linux/timer.h> 23#include <linux/timer.h>
24#include <linux/wait.h> 24#include <linux/wait.h>
25#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE 25#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
@@ -147,7 +147,7 @@ struct capidev {
147 147
148 struct capincci *nccis; 148 struct capincci *nccis;
149 149
150 struct semaphore ncci_list_sem; 150 struct mutex ncci_list_mtx;
151}; 151};
152 152
153/* -------- global variables ---------------------------------------- */ 153/* -------- global variables ---------------------------------------- */
@@ -395,7 +395,7 @@ static struct capidev *capidev_alloc(void)
395 if (!cdev) 395 if (!cdev)
396 return NULL; 396 return NULL;
397 397
398 init_MUTEX(&cdev->ncci_list_sem); 398 mutex_init(&cdev->ncci_list_mtx);
399 skb_queue_head_init(&cdev->recvqueue); 399 skb_queue_head_init(&cdev->recvqueue);
400 init_waitqueue_head(&cdev->recvwait); 400 init_waitqueue_head(&cdev->recvwait);
401 write_lock_irqsave(&capidev_list_lock, flags); 401 write_lock_irqsave(&capidev_list_lock, flags);
@@ -414,9 +414,9 @@ static void capidev_free(struct capidev *cdev)
414 } 414 }
415 skb_queue_purge(&cdev->recvqueue); 415 skb_queue_purge(&cdev->recvqueue);
416 416
417 down(&cdev->ncci_list_sem); 417 mutex_lock(&cdev->ncci_list_mtx);
418 capincci_free(cdev, 0xffffffff); 418 capincci_free(cdev, 0xffffffff);
419 up(&cdev->ncci_list_sem); 419 mutex_unlock(&cdev->ncci_list_mtx);
420 420
421 write_lock_irqsave(&capidev_list_lock, flags); 421 write_lock_irqsave(&capidev_list_lock, flags);
422 list_del(&cdev->list); 422 list_del(&cdev->list);
@@ -603,15 +603,15 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
603 if (CAPIMSG_CMD(skb->data) == CAPI_CONNECT_B3_CONF) { 603 if (CAPIMSG_CMD(skb->data) == CAPI_CONNECT_B3_CONF) {
604 u16 info = CAPIMSG_U16(skb->data, 12); // Info field 604 u16 info = CAPIMSG_U16(skb->data, 12); // Info field
605 if (info == 0) { 605 if (info == 0) {
606 down(&cdev->ncci_list_sem); 606 mutex_lock(&cdev->ncci_list_mtx);
607 capincci_alloc(cdev, CAPIMSG_NCCI(skb->data)); 607 capincci_alloc(cdev, CAPIMSG_NCCI(skb->data));
608 up(&cdev->ncci_list_sem); 608 mutex_unlock(&cdev->ncci_list_mtx);
609 } 609 }
610 } 610 }
611 if (CAPIMSG_CMD(skb->data) == CAPI_CONNECT_B3_IND) { 611 if (CAPIMSG_CMD(skb->data) == CAPI_CONNECT_B3_IND) {
612 down(&cdev->ncci_list_sem); 612 mutex_lock(&cdev->ncci_list_mtx);
613 capincci_alloc(cdev, CAPIMSG_NCCI(skb->data)); 613 capincci_alloc(cdev, CAPIMSG_NCCI(skb->data));
614 up(&cdev->ncci_list_sem); 614 mutex_unlock(&cdev->ncci_list_mtx);
615 } 615 }
616 spin_lock_irqsave(&workaround_lock, flags); 616 spin_lock_irqsave(&workaround_lock, flags);
617 if (CAPIMSG_COMMAND(skb->data) != CAPI_DATA_B3) { 617 if (CAPIMSG_COMMAND(skb->data) != CAPI_DATA_B3) {
@@ -752,9 +752,9 @@ capi_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos
752 CAPIMSG_SETAPPID(skb->data, cdev->ap.applid); 752 CAPIMSG_SETAPPID(skb->data, cdev->ap.applid);
753 753
754 if (CAPIMSG_CMD(skb->data) == CAPI_DISCONNECT_B3_RESP) { 754 if (CAPIMSG_CMD(skb->data) == CAPI_DISCONNECT_B3_RESP) {
755 down(&cdev->ncci_list_sem); 755 mutex_lock(&cdev->ncci_list_mtx);
756 capincci_free(cdev, CAPIMSG_NCCI(skb->data)); 756 capincci_free(cdev, CAPIMSG_NCCI(skb->data));
757 up(&cdev->ncci_list_sem); 757 mutex_unlock(&cdev->ncci_list_mtx);
758 } 758 }
759 759
760 cdev->errcode = capi20_put_message(&cdev->ap, skb); 760 cdev->errcode = capi20_put_message(&cdev->ap, skb);
@@ -939,9 +939,9 @@ capi_ioctl(struct inode *inode, struct file *file,
939 if (copy_from_user(&ncci, argp, sizeof(ncci))) 939 if (copy_from_user(&ncci, argp, sizeof(ncci)))
940 return -EFAULT; 940 return -EFAULT;
941 941
942 down(&cdev->ncci_list_sem); 942 mutex_lock(&cdev->ncci_list_mtx);
943 if ((nccip = capincci_find(cdev, (u32) ncci)) == 0) { 943 if ((nccip = capincci_find(cdev, (u32) ncci)) == 0) {
944 up(&cdev->ncci_list_sem); 944 mutex_unlock(&cdev->ncci_list_mtx);
945 return 0; 945 return 0;
946 } 946 }
947#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE 947#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
@@ -949,7 +949,7 @@ capi_ioctl(struct inode *inode, struct file *file,
949 count += atomic_read(&mp->ttyopencount); 949 count += atomic_read(&mp->ttyopencount);
950 } 950 }
951#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ 951#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
952 up(&cdev->ncci_list_sem); 952 mutex_unlock(&cdev->ncci_list_mtx);
953 return count; 953 return count;
954 } 954 }
955 return 0; 955 return 0;
@@ -964,14 +964,14 @@ capi_ioctl(struct inode *inode, struct file *file,
964 if (copy_from_user(&ncci, argp, 964 if (copy_from_user(&ncci, argp,
965 sizeof(ncci))) 965 sizeof(ncci)))
966 return -EFAULT; 966 return -EFAULT;
967 down(&cdev->ncci_list_sem); 967 mutex_lock(&cdev->ncci_list_mtx);
968 nccip = capincci_find(cdev, (u32) ncci); 968 nccip = capincci_find(cdev, (u32) ncci);
969 if (!nccip || (mp = nccip->minorp) == 0) { 969 if (!nccip || (mp = nccip->minorp) == 0) {
970 up(&cdev->ncci_list_sem); 970 mutex_unlock(&cdev->ncci_list_mtx);
971 return -ESRCH; 971 return -ESRCH;
972 } 972 }
973 unit = mp->minor; 973 unit = mp->minor;
974 up(&cdev->ncci_list_sem); 974 mutex_unlock(&cdev->ncci_list_mtx);
975 return unit; 975 return unit;
976 } 976 }
977 return 0; 977 return 0;
diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c
index ad1e2702c2d1..22379b94e88f 100644
--- a/drivers/isdn/capi/capiutil.c
+++ b/drivers/isdn/capi/capiutil.c
@@ -855,7 +855,7 @@ static _cdebbuf *g_debbuf;
855static u_long g_debbuf_lock; 855static u_long g_debbuf_lock;
856static _cmsg *g_cmsg; 856static _cmsg *g_cmsg;
857 857
858_cdebbuf *cdebbuf_alloc(void) 858static _cdebbuf *cdebbuf_alloc(void)
859{ 859{
860 _cdebbuf *cdb; 860 _cdebbuf *cdb;
861 861
@@ -989,11 +989,6 @@ _cdebbuf *capi_cmsg2str(_cmsg * cmsg)
989 return &g_debbuf; 989 return &g_debbuf;
990} 990}
991 991
992_cdebbuf *cdebbuf_alloc(void)
993{
994 return &g_debbuf;
995}
996
997void cdebbuf_free(_cdebbuf *cdb) 992void cdebbuf_free(_cdebbuf *cdb)
998{ 993{
999} 994}
@@ -1009,7 +1004,6 @@ void __exit cdebug_exit(void)
1009 1004
1010#endif 1005#endif
1011 1006
1012EXPORT_SYMBOL(cdebbuf_alloc);
1013EXPORT_SYMBOL(cdebbuf_free); 1007EXPORT_SYMBOL(cdebbuf_free);
1014EXPORT_SYMBOL(capi_cmsg2message); 1008EXPORT_SYMBOL(capi_cmsg2message);
1015EXPORT_SYMBOL(capi_message2cmsg); 1009EXPORT_SYMBOL(capi_message2cmsg);
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c
index 53a189003355..be77ee625bb7 100644
--- a/drivers/isdn/divert/divert_procfs.c
+++ b/drivers/isdn/divert/divert_procfs.c
@@ -11,7 +11,6 @@
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/poll.h> 13#include <linux/poll.h>
14#include <linux/smp_lock.h>
15#ifdef CONFIG_PROC_FS 14#ifdef CONFIG_PROC_FS
16#include <linux/proc_fs.h> 15#include <linux/proc_fs.h>
17#else 16#else
diff --git a/drivers/isdn/hardware/eicon/capimain.c b/drivers/isdn/hardware/eicon/capimain.c
index 7a74ed35b1bf..98fcdfc7ca55 100644
--- a/drivers/isdn/hardware/eicon/capimain.c
+++ b/drivers/isdn/hardware/eicon/capimain.c
@@ -13,7 +13,6 @@
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <asm/uaccess.h> 15#include <asm/uaccess.h>
16#include <linux/smp_lock.h>
17#include <linux/skbuff.h> 16#include <linux/skbuff.h>
18 17
19#include "os_capi.h" 18#include "os_capi.h"
diff --git a/drivers/isdn/hardware/eicon/dbgioctl.h b/drivers/isdn/hardware/eicon/dbgioctl.h
deleted file mode 100644
index 0fb6f5e88b60..000000000000
--- a/drivers/isdn/hardware/eicon/dbgioctl.h
+++ /dev/null
@@ -1,198 +0,0 @@
1
2/*
3 *
4 Copyright (c) Eicon Technology Corporation, 2000.
5 *
6 This source file is supplied for the use with Eicon
7 Technology Corporation's range of DIVA Server Adapters.
8 *
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13 *
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
16 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 See the GNU General Public License for more details.
18 *
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 */
24/*------------------------------------------------------------------*/
25/* file: dbgioctl.h */
26/*------------------------------------------------------------------*/
27
28#if !defined(__DBGIOCTL_H__)
29
30#define __DBGIOCTL_H__
31
32#ifdef NOT_YET_NEEDED
33/*
34 * The requested operation is passed in arg0 of DbgIoctlArgs,
35 * additional arguments (if any) in arg1, arg2 and arg3.
36 */
37
38typedef struct
39{ ULONG arg0 ;
40 ULONG arg1 ;
41 ULONG arg2 ;
42 ULONG arg3 ;
43} DbgIoctlArgs ;
44
45#define DBG_COPY_LOGS 0 /* copy debugs to user until buffer full */
46 /* arg1: size threshold */
47 /* arg2: timeout in milliseconds */
48
49#define DBG_FLUSH_LOGS 1 /* flush pending debugs to user buffer */
50 /* arg1: internal driver id */
51
52#define DBG_LIST_DRVS 2 /* return the list of registered drivers */
53
54#define DBG_GET_MASK 3 /* get current debug mask of driver */
55 /* arg1: internal driver id */
56
57#define DBG_SET_MASK 4 /* set/change debug mask of driver */
58 /* arg1: internal driver id */
59 /* arg2: new debug mask */
60
61#define DBG_GET_BUFSIZE 5 /* get current buffer size of driver */
62 /* arg1: internal driver id */
63 /* arg2: new debug mask */
64
65#define DBG_SET_BUFSIZE 6 /* set new buffer size of driver */
66 /* arg1: new buffer size */
67
68/*
69 * common internal debug message structure
70 */
71
72typedef struct
73{ unsigned short id ; /* virtual driver id */
74 unsigned short type ; /* special message type */
75 unsigned long seq ; /* sequence number of message */
76 unsigned long size ; /* size of message in bytes */
77 unsigned long next ; /* offset to next buffered message */
78 LARGE_INTEGER NTtime ; /* 100 ns since 1.1.1601 */
79 unsigned char data[4] ;/* message data */
80} OldDbgMessage ;
81
82typedef struct
83{ LARGE_INTEGER NTtime ; /* 100 ns since 1.1.1601 */
84 unsigned short size ; /* size of message in bytes */
85 unsigned short ffff ; /* always 0xffff to indicate new msg */
86 unsigned short id ; /* virtual driver id */
87 unsigned short type ; /* special message type */
88 unsigned long seq ; /* sequence number of message */
89 unsigned char data[4] ;/* message data */
90} DbgMessage ;
91
92#endif
93
94#define DRV_ID_UNKNOWN 0x0C /* for messages via prtComp() */
95
96#define MSG_PROC_FLAG 0x80
97#define MSG_PROC_NO_GET(x) (((x) & MSG_PROC_FLAG) ? (((x) >> 4) & 7) : -1)
98#define MSG_PROC_NO_SET(x) (MSG_PROC_FLAG | (((x) & 7) << 4))
99
100#define MSG_TYPE_DRV_ID 0x0001
101#define MSG_TYPE_FLAGS 0x0002
102#define MSG_TYPE_STRING 0x0003
103#define MSG_TYPE_BINARY 0x0004
104
105#define MSG_HEAD_SIZE ((unsigned long)&(((DbgMessage *)0)->data[0]))
106#define MSG_ALIGN(len) (((unsigned long)(len) + MSG_HEAD_SIZE + 3) & ~3)
107#define MSG_SIZE(pMsg) MSG_ALIGN((pMsg)->size)
108#define MSG_NEXT(pMsg) ((DbgMessage *)( ((char *)(pMsg)) + MSG_SIZE(pMsg) ))
109
110#define OLD_MSG_HEAD_SIZE ((unsigned long)&(((OldDbgMessage *)0)->data[0]))
111#define OLD_MSG_ALIGN(len) (((unsigned long)(len)+OLD_MSG_HEAD_SIZE+3) & ~3)
112
113/*
114 * manifest constants
115 */
116
117#define MSG_FRAME_MAX_SIZE 2150 /* maximum size of B1 frame */
118#define MSG_TEXT_MAX_SIZE 1024 /* maximum size of msg text */
119#define MSG_MAX_SIZE MSG_ALIGN(MSG_FRAME_MAX_SIZE)
120#define DBG_MIN_BUFFER_SIZE 0x00008000 /* minimal total buffer size 32 KB */
121#define DBG_DEF_BUFFER_SIZE 0x00020000 /* default total buffer size 128 KB */
122#define DBG_MAX_BUFFER_SIZE 0x00400000 /* maximal total buffer size 4 MB */
123
124#define DBGDRV_NAME "Diehl_DIMAINT"
125#define UNIDBG_DRIVER L"\\Device\\Diehl_DIMAINT" /* UNICODE name for kernel */
126#define DEBUG_DRIVER "\\\\.\\" DBGDRV_NAME /* traditional string for apps */
127#define DBGVXD_NAME "DIMAINT"
128#define DEBUG_VXD "\\\\.\\" DBGVXD_NAME /* traditional string for apps */
129
130/*
131 * Special IDI interface debug construction
132 */
133
134#define DBG_IDI_SIG_REQ (unsigned long)0xF479C402
135#define DBG_IDI_SIG_IND (unsigned long)0xF479C403
136#define DBG_IDI_NL_REQ (unsigned long)0xF479C404
137#define DBG_IDI_NL_IND (unsigned long)0xF479C405
138
139typedef struct
140{ unsigned long magic_type ;
141 unsigned short data_len ;
142 unsigned char layer_ID ;
143 unsigned char entity_ID ;
144 unsigned char request ;
145 unsigned char ret_code ;
146 unsigned char indication ;
147 unsigned char complete ;
148 unsigned char data[4] ;
149} DbgIdiAct, *DbgIdiAction ;
150
151/*
152 * We want to use the same IOCTL codes in Win95 and WinNT.
153 * The official constructor for IOCTL codes is the CTL_CODE macro
154 * from <winoctl.h> (<devioctl.h> in WinNT DDK environment).
155 * The problem here is that we don't know how to get <winioctl.h>
156 * working in a Win95 DDK environment!
157 */
158
159# ifdef CTL_CODE /*{*/
160
161/* Assert that we have the same idea of the CTL_CODE macro. */
162
163#define CTL_CODE( DeviceType, Function, Method, Access ) ( \
164 ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
165)
166
167# else /* !CTL_CODE */ /*}{*/
168
169/* Use the definitions stolen from <winioctl.h>. */
170
171#define CTL_CODE( DeviceType, Function, Method, Access ) ( \
172 ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
173)
174
175#define METHOD_BUFFERED 0
176#define METHOD_IN_DIRECT 1
177#define METHOD_OUT_DIRECT 2
178#define METHOD_NEITHER 3
179
180#define FILE_ANY_ACCESS 0
181#define FILE_READ_ACCESS ( 0x0001 ) // file & pipe
182#define FILE_WRITE_ACCESS ( 0x0002 ) // file & pipe
183
184# endif /* CTL_CODE */ /*}*/
185
186/*
187 * Now we can define WinNT/Win95 DeviceIoControl codes.
188 *
189 * These codes are defined in di_defs.h too, a possible mismatch will be
190 * detected when the dbgtool is compiled.
191 */
192
193#define IOCTL_DRIVER_LNK \
194 CTL_CODE(0x8001U,0x701,METHOD_OUT_DIRECT,FILE_ANY_ACCESS)
195#define IOCTL_DRIVER_DBG \
196 CTL_CODE(0x8001U,0x702,METHOD_OUT_DIRECT,FILE_ANY_ACCESS)
197
198#endif /* __DBGIOCTL_H__ */
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c
index 4aba5c502d8e..c90928974249 100644
--- a/drivers/isdn/hardware/eicon/divamnt.c
+++ b/drivers/isdn/hardware/eicon/divamnt.c
@@ -13,7 +13,6 @@
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/smp_lock.h>
17#include <linux/poll.h> 16#include <linux/poll.h>
18#include <asm/uaccess.h> 17#include <asm/uaccess.h>
19 18
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c
index 556b19615bc7..78f141e77466 100644
--- a/drivers/isdn/hardware/eicon/divasi.c
+++ b/drivers/isdn/hardware/eicon/divasi.c
@@ -14,7 +14,6 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/sched.h> 16#include <linux/sched.h>
17#include <linux/smp_lock.h>
18#include <linux/poll.h> 17#include <linux/poll.h>
19#include <linux/proc_fs.h> 18#include <linux/proc_fs.h>
20#include <linux/skbuff.h> 19#include <linux/skbuff.h>
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index 5e862e244117..6d39f9360766 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -17,7 +17,6 @@
17#include <linux/ioport.h> 17#include <linux/ioport.h>
18#include <linux/workqueue.h> 18#include <linux/workqueue.h>
19#include <linux/pci.h> 19#include <linux/pci.h>
20#include <linux/smp_lock.h>
21#include <linux/interrupt.h> 20#include <linux/interrupt.h>
22#include <linux/list.h> 21#include <linux/list.h>
23#include <linux/poll.h> 22#include <linux/poll.h>
diff --git a/drivers/isdn/hardware/eicon/main_if.h b/drivers/isdn/hardware/eicon/main_if.h
deleted file mode 100644
index 0ea339afd424..000000000000
--- a/drivers/isdn/hardware/eicon/main_if.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 *
3 Copyright (c) Eicon Technology Corporation, 2000.
4 *
5 This source file is supplied for the use with Eicon
6 Technology Corporation's range of DIVA Server Adapters.
7 *
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12 *
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
15 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 See the GNU General Public License for more details.
17 *
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 *
22 */
23/*------------------------------------------------------------------*/
24/* file: main_if.h */
25/*------------------------------------------------------------------*/
26# ifndef MAIN_IF___H
27# define MAIN_IF___H
28
29# include "debug_if.h"
30
31void DI_lock (void) ;
32void DI_unlock (void) ;
33
34#ifdef NOT_YET_NEEDED
35void DI_nttime (LARGE_INTEGER *NTtime) ;
36void DI_ntlcltime(LARGE_INTEGER *NTtime, LARGE_INTEGER *lclNTtime) ;
37void DI_nttimefields(LARGE_INTEGER *NTtime, TIME_FIELDS *TimeFields);
38unsigned long DI_wintime(LARGE_INTEGER *NTtime) ;
39
40unsigned short DiInsertProcessorNumber (int type) ;
41void DiProcessEventLog (unsigned short id, unsigned long msgID, va_list ap);
42
43void StartIoctlTimer (void (*Handler)(void), unsigned long msec) ;
44void StopIoctlTimer (void) ;
45void UnpendIoctl (DbgRequest *pDbgReq) ;
46#endif
47
48void add_to_q(int, char* , unsigned int);
49# endif /* MAIN_IF___H */
50
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index ff09f07f440a..15d4942de53b 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -26,7 +26,6 @@
26#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
27#include <linux/proc_fs.h> 27#include <linux/proc_fs.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/smp_lock.h>
30#include <linux/delay.h> 29#include <linux/delay.h>
31#include <linux/list.h> 30#include <linux/list.h>
32#include <asm/types.h> 31#include <asm/types.h>
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index 9f44d3e69fb0..99e70d4103b6 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -37,7 +37,6 @@
37#include <linux/kernel_stat.h> 37#include <linux/kernel_stat.h>
38#include <linux/usb.h> 38#include <linux/usb.h>
39#include <linux/kernel.h> 39#include <linux/kernel.h>
40#include <linux/smp_lock.h>
41#include "hisax.h" 40#include "hisax.h"
42#include "hisax_if.h" 41#include "hisax_if.h"
43#include "hfc_usb.h" 42#include "hfc_usb.h"
diff --git a/drivers/isdn/hysdn/boardergo.c b/drivers/isdn/hysdn/boardergo.c
index 84dccd526ac0..6cdbad3a9926 100644
--- a/drivers/isdn/hysdn/boardergo.c
+++ b/drivers/isdn/hysdn/boardergo.c
@@ -443,7 +443,7 @@ ergo_inithardware(hysdn_card * card)
443 card->waitpofready = ergo_waitpofready; 443 card->waitpofready = ergo_waitpofready;
444 card->set_errlog_state = ergo_set_errlog_state; 444 card->set_errlog_state = ergo_set_errlog_state;
445 INIT_WORK(&card->irq_queue, ergo_irq_bh); 445 INIT_WORK(&card->irq_queue, ergo_irq_bh);
446 card->hysdn_lock = SPIN_LOCK_UNLOCKED; 446 spin_lock_init(&card->hysdn_lock);
447 447
448 return (0); 448 return (0);
449} /* ergo_inithardware */ 449} /* ergo_inithardware */
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c
index 4c7dedac0e51..27b3991fb0ec 100644
--- a/drivers/isdn/hysdn/hysdn_proclog.c
+++ b/drivers/isdn/hysdn/hysdn_proclog.c
@@ -297,8 +297,6 @@ hysdn_log_close(struct inode *ino, struct file *filep)
297 struct procdata *pd; 297 struct procdata *pd;
298 hysdn_card *card; 298 hysdn_card *card;
299 int retval = 0; 299 int retval = 0;
300 unsigned long flags;
301 spinlock_t hysdn_lock = SPIN_LOCK_UNLOCKED;
302 300
303 lock_kernel(); 301 lock_kernel();
304 if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) { 302 if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) {
@@ -308,7 +306,6 @@ hysdn_log_close(struct inode *ino, struct file *filep)
308 /* read access -> log/debug read, mark one further file as closed */ 306 /* read access -> log/debug read, mark one further file as closed */
309 307
310 pd = NULL; 308 pd = NULL;
311 spin_lock_irqsave(&hysdn_lock, flags);
312 inf = *((struct log_data **) filep->private_data); /* get first log entry */ 309 inf = *((struct log_data **) filep->private_data); /* get first log entry */
313 if (inf) 310 if (inf)
314 pd = (struct procdata *) inf->proc_ctrl; /* still entries there */ 311 pd = (struct procdata *) inf->proc_ctrl; /* still entries there */
@@ -331,7 +328,6 @@ hysdn_log_close(struct inode *ino, struct file *filep)
331 inf->usage_cnt--; /* decrement usage count for buffers */ 328 inf->usage_cnt--; /* decrement usage count for buffers */
332 inf = inf->next; 329 inf = inf->next;
333 } 330 }
334 spin_unlock_irqrestore(&hysdn_lock, flags);
335 331
336 if (pd) 332 if (pd)
337 if (pd->if_used <= 0) /* delete buffers if last file closed */ 333 if (pd->if_used <= 0) /* delete buffers if last file closed */
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c
index e93ad59f60bf..bb92e3cd9334 100644
--- a/drivers/isdn/isdnloop/isdnloop.c
+++ b/drivers/isdn/isdnloop/isdnloop.c
@@ -1462,7 +1462,7 @@ isdnloop_initcard(char *id)
1462 skb_queue_head_init(&card->bqueue[i]); 1462 skb_queue_head_init(&card->bqueue[i]);
1463 } 1463 }
1464 skb_queue_head_init(&card->dqueue); 1464 skb_queue_head_init(&card->dqueue);
1465 card->isdnloop_lock = SPIN_LOCK_UNLOCKED; 1465 spin_lock_init(&card->isdnloop_lock);
1466 card->next = cards; 1466 card->next = cards;
1467 cards = card; 1467 cards = card;
1468 if (!register_isdn(&card->interface)) { 1468 if (!register_isdn(&card->interface)) {