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

From: Jeff Garzik (jgarzik@pobox.com)
Date: Wed Jun 04 2003 - 23:18:50 EST


Linux Kernel Mailing List wrote:
> 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
>
>
> # This patch includes the following deltas:
> # ChangeSet 1.1254.4.14 -> 1.1254.4.15
> # sound/oss/via82cxxx_audio.c 1.27 -> 1.28
> #
>
> 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 20:28:51 2003
> +++ b/sound/oss/via82cxxx_audio.c Wed Jun 4 20:28:51 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);

Looking at your various commits in this vein, it really looks like there
needs to be a function that returns the PCI device, given the struct
pci_driver pointer. pci_find_driver() perhaps?

        Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 07 2003 - 22:00:26 EST