patch-2.2.12 linux/drivers/isdn/divert/divert_procfs.c

Next file: linux/drivers/isdn/eicon/eicon.h
Previous file: linux/drivers/isdn/avmb1/kcapi.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.11/linux/drivers/isdn/divert/divert_procfs.c linux/drivers/isdn/divert/divert_procfs.c
@@ -1,5 +1,5 @@
 /* 
- * $Id: divert_procfs.c,v 1.3 1999/07/05 20:21:41 werner Exp $
+ * $Id: divert_procfs.c,v 1.4 1999/08/06 07:42:48 calle Exp $
  *
  * Filesystem handling for the diversion supplementary services.
  *
@@ -20,6 +20,9 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
  * $Log: divert_procfs.c,v $
+ * Revision 1.4  1999/08/06 07:42:48  calle
+ * Added COMPAT_HAS_NEW_WAITQ for rd_queue for newer kernels.
+ *
  * Revision 1.3  1999/07/05 20:21:41  werner
  * changes to use diversion sources for all kernel versions.
  * removed static device, only proc filesystem used
@@ -44,6 +47,7 @@
   #include <linux/fs.h>
 #endif
 #include <linux/isdnif.h>
+#include <linux/isdn_compat.h>
 #include "isdn_divert.h"
 
 /*********************************/
@@ -52,7 +56,11 @@
 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 */
+#ifdef COMPAT_HAS_NEW_WAITQ
+static wait_queue_head_t rd_queue;
+#else
 static struct wait_queue *rd_queue = 0; /* Queue IO */
+#endif
 
 /*********************************/
 /* put an info buffer into queue */
@@ -387,6 +395,10 @@
 /***************************************************************************/
 int divert_dev_init(void)
 { int i;
+
+#ifdef COMPAT_HAS_NEW_WAITQ
+	init_waitqueue_head(&rd_queue);
+#endif
 
 #ifdef CONFIG_PROC_FS
 #if (LINUX_VERSION_CODE < 0x020117)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)