Commit 590582d3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] PCI: remove usage of pci_for_each_dev() in sound/oss/maestro.c

parent 301b22c5
...@@ -2132,10 +2132,10 @@ static int ess_open_mixdev(struct inode *inode, struct file *file) ...@@ -2132,10 +2132,10 @@ static int ess_open_mixdev(struct inode *inode, struct file *file)
{ {
unsigned int minor = minor(inode->i_rdev); unsigned int minor = minor(inode->i_rdev);
struct ess_card *card = NULL; struct ess_card *card = NULL;
struct pci_dev *pdev; struct pci_dev *pdev = NULL;
struct pci_driver *drvr; struct pci_driver *drvr;
pci_for_each_dev(pdev) { while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
drvr = pci_dev_driver (pdev); drvr = pci_dev_driver (pdev);
if (drvr == &maestro_pci_driver) { if (drvr == &maestro_pci_driver) {
card = (struct ess_card*)pci_get_drvdata (pdev); card = (struct ess_card*)pci_get_drvdata (pdev);
...@@ -2978,13 +2978,13 @@ ess_open(struct inode *inode, struct file *file) ...@@ -2978,13 +2978,13 @@ ess_open(struct inode *inode, struct file *file)
unsigned int minor = minor(inode->i_rdev); unsigned int minor = minor(inode->i_rdev);
struct ess_state *s = NULL; struct ess_state *s = NULL;
unsigned char fmtm = ~0, fmts = 0; unsigned char fmtm = ~0, fmts = 0;
struct pci_dev *pdev; struct pci_dev *pdev = NULL;
/* /*
* Scan the cards and find the channel. We only * Scan the cards and find the channel. We only
* do this at open time so it is ok * do this at open time so it is ok
*/ */
pci_for_each_dev(pdev) { while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
struct ess_card *c; struct ess_card *c;
struct pci_driver *drvr; struct pci_driver *drvr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment