patch-2.3.9 linux/drivers/sgi/char/shmiq.c

Next file: linux/drivers/sgi/char/streamable.c
Previous file: linux/drivers/sgi/char/sgiserial.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.8/linux/drivers/sgi/char/shmiq.c linux/drivers/sgi/char/shmiq.c
@@ -1,4 +1,5 @@
-/*
+/* $Id: shmiq.c,v 1.12 1999/06/17 13:29:04 ralf Exp $
+ *
  * shmiq.c: shared memory input queue driver
  * written 1997 Miguel de Icaza (miguel@nuclecu.unam.mx)
  *
@@ -47,6 +48,7 @@
 #include <linux/sched.h>
 #include <linux/file.h>
 #include <linux/interrupt.h>
+#include <linux/poll.h>
 #include <linux/vmalloc.h>
 #include <linux/wait.h>
 #include <linux/major.h>
@@ -82,7 +84,7 @@
 	int    events;
 	int    mapped;
 	
-	wait_queue_head_t     proc_list;
+	wait_queue_head_t    proc_list;
 	struct fasync_struct *fasync;
 } shmiqs [MAX_SHMI_QUEUES];
 
@@ -237,7 +239,7 @@
 	return -EBADF;
 }
 
-extern sys_munmap(unsigned long addr, size_t len);
+extern int sys_munmap(unsigned long addr, size_t len);
 
 static int
 qcntl_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg, int minor)
@@ -394,12 +396,12 @@
 }
 
 static int
-shmiq_qcntl_fasync (struct file *file, int on)
+shmiq_qcntl_fasync (int fd, struct file *file, int on)
 {
 	int retval;
 	int minor = MINOR (file->f_dentry->d_inode->i_rdev);
 
-	retval = fasync_helper (file, on, &shmiqs [minor].fasync);
+	retval = fasync_helper (fd, file, on, &shmiqs [minor].fasync);
 	if (retval < 0)
 		return retval;
 	return 0;
@@ -422,7 +424,7 @@
 		return -EINVAL;
 
 	lock_kernel ();
-	shmiq_qcntl_fasync (filp, 0);
+	shmiq_qcntl_fasync (-1, filp, 0);
 	shmiqs [minor].opened      = 0;
 	shmiqs [minor].mapped      = 0;
 	shmiqs [minor].events      = 0;

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