X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fzr36120.c;h=628282393965c84dfc5a939d2b3cbc7714e2af2e;hb=9e1bf581d67d87a1d7fc0ea500729e3a03643a26;hp=9780261c59ce32fdfa44625dcef34dbe8831bf02;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/drivers/media/video/zr36120.c b/drivers/media/video/zr36120.c index 9780261c5..628282393 100644 --- a/drivers/media/video/zr36120.c +++ b/drivers/media/video/zr36120.c @@ -145,11 +145,14 @@ static struct { const char name[8]; uint mode; uint bpp; } palette2fmt[] = { static void __init handle_chipset(void) { + struct pci_dev *dev = NULL; + /* Just in case some nut set this to something dangerous */ if (triton1) triton1 = ZORAN_VDC_TRICOM; - if (pci_pci_problems & PCIPCI_TRITON) { + while ((dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437, dev))) + { printk(KERN_INFO "zoran: Host bridge 82437FX Triton PIIX\n"); triton1 = ZORAN_VDC_TRICOM; } @@ -816,7 +819,8 @@ void zoran_close(struct video_device* dev) * be sure its safe to free the buffer. We wait 5-6 fields * which is more than sufficient to be sure. */ - msleep(100); /* Wait 1/10th of a second */ + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(HZ/10); /* Wait 1/10th of a second */ /* free the allocated framebuffer */ if (ztv->fbuffer) @@ -1470,9 +1474,9 @@ int zoran_mmap(struct vm_area_struct *vma, struct video_device* dev, const char* /* start mapping the whole shabang to user memory */ pos = (unsigned long)ztv->fbuffer; - while (size>0) { - unsigned long pfn = virt_to_phys((void*)pos) >> PAGE_SHIFT; - if (remap_pfn_range(vma, start, pfn, PAGE_SIZE, PAGE_SHARED)) + while (size > 0) { + unsigned long page = virt_to_phys((void*)pos); + if (remap_page_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) return -EAGAIN; start += PAGE_SIZE; pos += PAGE_SIZE; @@ -1564,7 +1568,8 @@ void vbi_close(struct video_device *dev) * be sure its safe to free the buffer. We wait 5-6 fields * which is more than sufficient to be sure. */ - msleep(100); /* Wait 1/10th of a second */ + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(HZ/10); /* Wait 1/10th of a second */ for (item=ztv->readinfo; item!=ztv->readinfo+ZORAN_VBI_BUFFERS; item++) {