Merge branch 'master' into upstream
[sfrench/cifs-2.6.git] / drivers / media / video / zr36120.c
index 6ac3b67400895c489ca2612d0debbc3813b4adf4..9240638a01342bca3ad81d7b463dc906b30764cd 100644 (file)
@@ -987,6 +987,8 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg)
                         VID_TYPE_SCALES;
                if (ztv->have_tuner)
                        c.type |= VID_TYPE_TUNER;
+               if (pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL))
+                       c.type &= ~VID_TYPE_OVERLAY;
                if (ztv->have_decoder) {
                        c.channels = ztv->card->video_inputs;
                        c.audios = ztv->card->audio_inputs;
@@ -1284,6 +1286,8 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg)
                struct video_buffer v;
                if(!capable(CAP_SYS_ADMIN))
                        return -EPERM;
+               if (pcipci_problems & (PCIPCI_FAIL|PCIAGP_FAIL))
+                       return -ENXIO;
                if (copy_from_user(&v, arg,sizeof(v)))
                        return -EFAULT;
                DEBUG(printk(CARD_DEBUG "VIDIOCSFBUF(%p,%d,%d,%d,%d)\n",CARD,v.base, v.width,v.height,v.depth,v.bytesperline));
@@ -1858,7 +1862,7 @@ int __init find_zoran(void)
                DEBUG(printk(KERN_DEBUG "zoran: mapped-memory at 0x%p\n",ztv->zoran_mem));
 
                result = request_irq(dev->irq, zoran_irq,
-                       SA_SHIRQ|SA_INTERRUPT,"zoran", ztv);
+                       IRQF_SHARED|IRQF_DISABLED,"zoran", ztv);
                if (result==-EINVAL)
                {
                        iounmap(ztv->zoran_mem);
@@ -2030,7 +2034,7 @@ void release_zoran(int max)
                /* free it */
                free_irq(ztv->dev->irq,ztv);
 
-               /* unregister i2c_bus */
+               /* unregister i2c_bus */
                i2c_unregister_bus((&ztv->i2c));
 
                /* unmap and free memory */