patch-2.1.116 linux/drivers/char/videodev.c

Next file: linux/drivers/net/3c505.h
Previous file: linux/drivers/char/tty_io.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.115/linux/drivers/char/videodev.c linux/drivers/char/videodev.c
@@ -108,7 +108,6 @@
 }
 
 
-
 /*
  *	Write for now does nothing. No reason it shouldnt do overlay setting
  *	for some boards I guess..
@@ -124,6 +123,21 @@
 		return 0;
 }
 
+
+/*
+ *	Poll to see if we're readable, can probably be used for timing on incoming
+ *  frames, etc..
+ */
+
+static unsigned int video_poll(struct file *file, poll_table * wait)
+{
+	struct video_device *vfl=video_device[MINOR(file->f_dentry->d_inode->i_rdev)];
+	if(vfl->poll)
+		return vfl->poll(vfl, file, wait);
+	else
+		return 0;
+}
+
 /*
  *	Open a video device.
  */
@@ -297,7 +311,7 @@
 	video_read,
 	video_write,
 	NULL,	/* readdir */
-	NULL,	/* poll */
+	video_poll,	/* poll */
 	video_ioctl,
 	video_mmap,
 	video_open,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov