Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261234AbUJXSna (ORCPT ); Sun, 24 Oct 2004 14:43:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261579AbUJXSna (ORCPT ); Sun, 24 Oct 2004 14:43:30 -0400 Received: from gold.pobox.com ([208.210.124.73]:30605 "EHLO gold.pobox.com") by vger.kernel.org with ESMTP id S261234AbUJXSn1 (ORCPT ); Sun, 24 Oct 2004 14:43:27 -0400 Subject: Re: [KJ] [PATCH 2.6] cyclades.c: replace pci_find_device From: Scott Feldman Reply-To: sfeldma@pobox.com To: Hanna Linder Cc: lkml , kernel-janitors , greg@kroah.com, Marcelo Tosatti In-Reply-To: <267570000.1098383749@w-hlinder.beaverton.ibm.com> References: <267570000.1098383749@w-hlinder.beaverton.ibm.com> Content-Type: text/plain Message-Id: <1098643610.4188.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Sun, 24 Oct 2004 11:46:50 -0700 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1268 Lines: 24 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 - 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/