mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2.6] cyclades.c: replace pci_find_device
@ 2004-10-21 18:35 Hanna Linder
  2004-10-24 18:46 ` [KJ] " Scott Feldman
  2004-11-05 23:06 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Hanna Linder @ 2004-10-21 18:35 UTC (permalink / raw)
  To: lkml, kernel-janitors; +Cc: greg, hannal, Marcelo Tosatti


As pci_find_device is going away I've replaced it with pci_get_device.
If someone with this hardware could test it I would appreciate it.

Thanks.

Hanna Linder
IBM Linux Technology Center

Signed-off-by: Hanna Linder <hannal@us.ibm.com>

---
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 {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [KJ] [PATCH 2.6] cyclades.c: replace pci_find_device
  2004-10-21 18:35 [PATCH 2.6] cyclades.c: replace pci_find_device Hanna Linder
@ 2004-10-24 18:46 ` Scott Feldman
  2004-11-05 23:06 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Scott Feldman @ 2004-10-24 18:46 UTC (permalink / raw)
  To: Hanna Linder; +Cc: lkml, kernel-janitors, greg, Marcelo Tosatti

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2.6] cyclades.c: replace pci_find_device
  2004-10-21 18:35 [PATCH 2.6] cyclades.c: replace pci_find_device Hanna Linder
  2004-10-24 18:46 ` [KJ] " Scott Feldman
@ 2004-11-05 23:06 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-11-05 23:06 UTC (permalink / raw)
  To: Hanna Linder; +Cc: lkml, kernel-janitors, Marcelo Tosatti

On Thu, Oct 21, 2004 at 11:35:49AM -0700, Hanna Linder wrote:
> 
> As pci_find_device is going away I've replaced it with pci_get_device.
> If someone with this hardware could test it I would appreciate it.
> 
> Thanks.
> 
> Hanna Linder
> IBM Linux Technology Center
> 
> Signed-off-by: Hanna Linder <hannal@us.ibm.com>


Applied, thanks.

greg k-h


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-05 23:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-21 18:35 [PATCH 2.6] cyclades.c: replace pci_find_device Hanna Linder
2004-10-24 18:46 ` [KJ] " Scott Feldman
2004-11-05 23:06 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®