[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kernel-janitors
Subject:    Re: [KJ] [PATCH 2.6] cyclades.c: replace pci_find_device
From:       Scott Feldman <sfeldma () pobox ! com>
Date:       2004-10-24 18:46:50
Message-ID: 1098643610.4188.6.camel () localhost ! localdomain
[Download RAW message or body]

On Thu, 2004-10-21 at 11:35, Hanna Linder wrote:
> diff -Nrup linux-2.6.9cln/drivers/char/cyclades.c linux-2.6.9patch/drivers/char/cyclades.c
> --- linux-2.6.9cln/drivers/char/cyclades.c	2004-10-18 16:35:53.000000000 -0700
> +++ linux-2.6.9patch/drivers/char/cyclades.c	2004-10-20 15:31:49.803025392 -0700
> @@ -4765,7 +4765,7 @@ cy_detect_pci(void)
>          for (i = 0; i < NR_CARDS; i++) {
>                  /* look for a Cyclades card by vendor and device id */
>                  while((device_id = cy_pci_dev_id[dev_index]) != 0) {
> -                        if((pdev = pci_find_device(PCI_VENDOR_ID_CYCLADES,
> +                        if((pdev = pci_get_device(PCI_VENDOR_ID_CYCLADES,
>                                          device_id, pdev)) == NULL) {
>                                  dev_index++;    /* try next device id */
>                          } else {

If there are NR_CARDS (or more) in the system, this will leave a pdev on
the table.  A pci_dev_put after the for-loop should catch it.

-scott



_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic