ChangeSet 1.1254.4.15, 2003/06/04 12:30:25-07:00, greg@kroah.com [PATCH] PCI: remove usage of pci_for_each_dev() in sound/oss/via82cxxx_audio.c sound/oss/via82cxxx_audio.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff -Nru a/sound/oss/via82cxxx_audio.c b/sound/oss/via82cxxx_audio.c --- a/sound/oss/via82cxxx_audio.c Wed Jun 4 18:11:17 2003 +++ b/sound/oss/via82cxxx_audio.c Wed Jun 4 18:11:17 2003 @@ -1357,12 +1357,12 @@ { int minor = minor(inode->i_rdev); struct via_info *card; - struct pci_dev *pdev; + struct pci_dev *pdev = NULL; struct pci_driver *drvr; DPRINTK ("ENTER\n"); - pci_for_each_dev(pdev) { + while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) { drvr = pci_dev_driver (pdev); if (drvr == &via_driver) { assert (pci_get_drvdata (pdev) != NULL); @@ -2982,8 +2982,8 @@ static int via_dsp_open (struct inode *inode, struct file *file) { int minor = minor(inode->i_rdev); - struct via_info *card; - struct pci_dev *pdev; + struct via_info *card = NULL; + struct pci_dev *pdev = NULL; struct via_channel *chan; struct pci_driver *drvr; int nonblock = (file->f_flags & O_NONBLOCK); @@ -2995,8 +2995,7 @@ return -EINVAL; } - card = NULL; - pci_for_each_dev(pdev) { + while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) { drvr = pci_dev_driver (pdev); if (drvr == &via_driver) { assert (pci_get_drvdata (pdev) != NULL);