patch-2.4.19 linux-2.4.19/drivers/media/video/stradis.c
Next file: linux-2.4.19/drivers/media/video/tda7432.c
Previous file: linux-2.4.19/drivers/media/video/saa7196.h
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/media/video/stradis.c
- Orig date:
Sun Sep 30 12:26:06 2001
diff -urN linux-2.4.18/drivers/media/video/stradis.c linux-2.4.19/drivers/media/video/stradis.c
@@ -1454,6 +1454,9 @@
if (copy_from_user(saa->dmavid2, vw.clips,
VIDEO_CLIPMAP_SIZE))
return -EFAULT;
+ }
+ else if (vw.clipcount > 16384) {
+ return -EINVAL;
} else if (vw.clipcount > 0) {
if ((vcp = vmalloc(sizeof(struct video_clip) *
(vw.clipcount))) == NULL)
@@ -1972,7 +1975,9 @@
{
struct saa7146 *saa = (struct saa7146 *) dev;
- saa->video_dev.busy = 0;
+ /* FIXME: Don't do it this way, use the video_device->fops
+ * registration for a sane implementation of multiple opens */
+ saa->video_dev.users--;
saa->user++;
if (saa->user > 1)
return 0; /* device open already, don't reset */
@@ -1984,7 +1989,7 @@
{
struct saa7146 *saa = (struct saa7146 *) dev;
saa->user--;
- saa->video_dev.busy = 0;
+ saa->video_dev.users++;
if (saa->user > 0) /* still someone using device */
return;
saawrite(0x007f0000, SAA7146_MC1); /* stop all overlay dma */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)