X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fzoran_card.c;h=653822ce391c574492f5c78c677ad7414edcd696;hb=18d8a4540caddaa9a42fb4dbc04c75c4b806278b;hp=f2249ed25273bc5ded10a920e4891e587faf1c67;hpb=0d1782144e81faf6203075c5fcd0a2f0db91af5b;p=linux-2.6-omap-h63xx.git diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c index f2249ed2527..653822ce391 100644 --- a/drivers/media/video/zoran_card.c +++ b/drivers/media/video/zoran_card.c @@ -820,7 +820,6 @@ static struct i2c_algo_bit_data zoran_i2c_bit_data_template = { .getsda = zoran_i2c_getsda, .getscl = zoran_i2c_getscl, .udelay = 10, - .mdelay = 0, .timeout = 100, }; @@ -1279,9 +1278,7 @@ find_zr36057 (void) zoran_num = 0; while (zoran_num < BUZ_MAX && - (dev = - pci_find_device(PCI_VENDOR_ID_ZORAN, - PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) { + (dev = pci_get_device(PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) { card_num = card[zoran_num]; zr = &zoran[zoran_num]; memset(zr, 0, sizeof(struct zoran)); // Just in case if previous cycle failed @@ -1542,7 +1539,8 @@ find_zr36057 (void) goto zr_detach_vfe; } } - + /* Success so keep the pci_dev referenced */ + pci_dev_get(zr->pci_dev); zoran_num++; continue; @@ -1564,6 +1562,9 @@ find_zr36057 (void) iounmap(zr->zr36057_mem); continue; } + if (dev) /* Clean up ref count on early exit */ + pci_dev_put(dev); + if (zoran_num == 0) { dprintk(1, KERN_INFO "No known MJPEG cards found.\n"); } @@ -1621,10 +1622,10 @@ init_dc10_cards (void) dprintk(5, KERN_DEBUG "Jotti is een held!\n"); /* some mainboards might not do PCI-PCI data transfer well */ - if (pci_pci_problems & PCIPCI_FAIL) { + if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL|PCIPCI_ALIMAGIK)) { dprintk(1, KERN_WARNING - "%s: chipset may not support reliable PCI-PCI DMA\n", + "%s: chipset does not support reliable PCI-PCI DMA\n", ZORAN_NAME); } @@ -1632,7 +1633,7 @@ init_dc10_cards (void) for (i = 0; i < zoran_num; i++) { struct zoran *zr = &zoran[i]; - if (pci_pci_problems & PCIPCI_NATOMA && zr->revision <= 1) { + if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) { zr->jpg_buffers.need_contiguous = 1; dprintk(1, KERN_INFO