aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-09-14 10:53:09 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 11:30:36 -0400
commit13f1371e8fb53df6b0a6c0cc7de56195bf132f1c (patch)
tree93fec098c3b58f9dc5f7a0007ed01675136b5cd7 /drivers
parente355880b838c80ff53e6386a1caad10e6f719259 (diff)
V4L/DVB (4634): Zr36120: implement pcipci checks
Again depends on the PCIAGP_FAIL patch for a define. Someone with more card knowledge should look at the ALIMAGIK case and whether latency can be safely to set to 0xA or so. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/zr36120.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/zr36120.c b/drivers/media/video/zr36120.c
index 50437383ed62..9240638a0134 100644
--- a/drivers/media/video/zr36120.c
+++ b/drivers/media/video/zr36120.c
@@ -987,6 +987,8 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg)
987 VID_TYPE_SCALES; 987 VID_TYPE_SCALES;
988 if (ztv->have_tuner) 988 if (ztv->have_tuner)
989 c.type |= VID_TYPE_TUNER; 989 c.type |= VID_TYPE_TUNER;
990 if (pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL))
991 c.type &= ~VID_TYPE_OVERLAY;
990 if (ztv->have_decoder) { 992 if (ztv->have_decoder) {
991 c.channels = ztv->card->video_inputs; 993 c.channels = ztv->card->video_inputs;
992 c.audios = ztv->card->audio_inputs; 994 c.audios = ztv->card->audio_inputs;
@@ -1284,6 +1286,8 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg)
1284 struct video_buffer v; 1286 struct video_buffer v;
1285 if(!capable(CAP_SYS_ADMIN)) 1287 if(!capable(CAP_SYS_ADMIN))
1286 return -EPERM; 1288 return -EPERM;
1289 if (pcipci_problems & (PCIPCI_FAIL|PCIAGP_FAIL))
1290 return -ENXIO;
1287 if (copy_from_user(&v, arg,sizeof(v))) 1291 if (copy_from_user(&v, arg,sizeof(v)))
1288 return -EFAULT; 1292 return -EFAULT;
1289 DEBUG(printk(CARD_DEBUG "VIDIOCSFBUF(%p,%d,%d,%d,%d)\n",CARD,v.base, v.width,v.height,v.depth,v.bytesperline)); 1293 DEBUG(printk(CARD_DEBUG "VIDIOCSFBUF(%p,%d,%d,%d,%d)\n",CARD,v.base, v.width,v.height,v.depth,v.bytesperline));
@@ -2030,7 +2034,7 @@ void release_zoran(int max)
2030 /* free it */ 2034 /* free it */
2031 free_irq(ztv->dev->irq,ztv); 2035 free_irq(ztv->dev->irq,ztv);
2032 2036
2033 /* unregister i2c_bus */ 2037 /* unregister i2c_bus */
2034 i2c_unregister_bus((&ztv->i2c)); 2038 i2c_unregister_bus((&ztv->i2c));
2035 2039
2036 /* unmap and free memory */ 2040 /* unmap and free memory */