patch-2.3.37 linux/drivers/char/bttv.c

Next file: linux/drivers/char/random.c
Previous file: linux/drivers/char/agp/agpgart_fe.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.36/linux/drivers/char/bttv.c linux/drivers/char/bttv.c
@@ -3465,13 +3465,12 @@
 
 static int find_bt848(void)
 {
-        struct pci_dev *dev = pci_devices;
+        struct pci_dev *dev;
         int result=0;
 
         bttv_num=0;
 
-        while (dev)
-        {
+	pci_for_each_dev(dev) {
                 if (dev->vendor == PCI_VENDOR_ID_BROOKTREE)
                         if ((dev->device == PCI_DEVICE_ID_BT848)||
                             (dev->device == PCI_DEVICE_ID_BT849)||
@@ -3480,7 +3479,6 @@
                                 result=configure_bt848(dev,bttv_num++);
                 if (result)
                         return result;
-                dev = dev->next;
         }
 	if(bttv_num)
 		printk(KERN_INFO "bttv: %d Bt8xx card(s) found.\n", bttv_num);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)