aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zoran_card.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-10-03 19:44:12 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-04 07:06:50 -0400
commite491cbc8b2eabc8856bf890006604edd91b1cce2 (patch)
treeded403fd4d2a7e159ba001c66a4373695629df42 /drivers/media/video/zoran_card.c
parenta868b45dad04854e07bb1c7c81a73930098bc370 (diff)
V4L/DVB (4707): 4linux: complete conversion to hotplug safe PCI API
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/zoran_card.c')
-rw-r--r--drivers/media/video/zoran_card.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c
index 9f21d0ba0f0..653822ce391 100644
--- a/drivers/media/video/zoran_card.c
+++ b/drivers/media/video/zoran_card.c
@@ -1278,9 +1278,7 @@ find_zr36057 (void)
1278 1278
1279 zoran_num = 0; 1279 zoran_num = 0;
1280 while (zoran_num < BUZ_MAX && 1280 while (zoran_num < BUZ_MAX &&
1281 (dev = 1281 (dev = pci_get_device(PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) {
1282 pci_find_device(PCI_VENDOR_ID_ZORAN,
1283 PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) {
1284 card_num = card[zoran_num]; 1282 card_num = card[zoran_num];
1285 zr = &zoran[zoran_num]; 1283 zr = &zoran[zoran_num];
1286 memset(zr, 0, sizeof(struct zoran)); // Just in case if previous cycle failed 1284 memset(zr, 0, sizeof(struct zoran)); // Just in case if previous cycle failed
@@ -1541,7 +1539,8 @@ find_zr36057 (void)
1541 goto zr_detach_vfe; 1539 goto zr_detach_vfe;
1542 } 1540 }
1543 } 1541 }
1544 1542 /* Success so keep the pci_dev referenced */
1543 pci_dev_get(zr->pci_dev);
1545 zoran_num++; 1544 zoran_num++;
1546 continue; 1545 continue;
1547 1546
@@ -1563,6 +1562,9 @@ find_zr36057 (void)
1563 iounmap(zr->zr36057_mem); 1562 iounmap(zr->zr36057_mem);
1564 continue; 1563 continue;
1565 } 1564 }
1565 if (dev) /* Clean up ref count on early exit */
1566 pci_dev_put(dev);
1567
1566 if (zoran_num == 0) { 1568 if (zoran_num == 0) {
1567 dprintk(1, KERN_INFO "No known MJPEG cards found.\n"); 1569 dprintk(1, KERN_INFO "No known MJPEG cards found.\n");
1568 } 1570 }