From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Buesch Subject: Re: [PATCH 2/3] pci: bcm43xx kill pci_find_device Date: Thu, 25 May 2006 23:55:35 +0200 Message-ID: <200605252355.36453.mb@bu3sch.de> References: <20060525003040.A91E0C7BDC@atrey.karlin.mff.cuni.cz> <4474FE3E.9040303@garzik.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Jeff Garzik , Greg KH , Linux Kernel Mailing List , linux-pci@atrey.karlin.mff.cuni.cz, Netdev List Return-path: Received: from static-ip-62-75-166-246.inaddr.intergenia.de ([62.75.166.246]:57476 "EHLO bu3sch.de") by vger.kernel.org with ESMTP id S1030449AbWEYV40 (ORCPT ); Thu, 25 May 2006 17:56:26 -0400 To: Jiri Slaby In-Reply-To: <4474FE3E.9040303@garzik.org> Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Thursday 25 May 2006 02:45, you wrote: > Jiri Slaby wrote: > > bcm43xx kill pci_find_device > > > > Change pci_find_device to safer pci_get_device. > > > > Signed-off-by: Jiri Slaby > > > > --- > > commit 75664d3c6fe1d8d00b87e42cc001cb5d90613dae > > tree ebcec31955a991f1661197c7e8bcdd682e030681 > > parent 431ef31d431939bc9370f952d9510ab9e5b0ad47 > > author Jiri Slaby Thu, 25 May 2006 02:04:38 +0159 > > committer Jiri Slaby Thu, 25 May 2006 02:04:38 +0159 > > > > drivers/net/wireless/bcm43xx/bcm43xx_main.c | 3 ++- > > 1 files changed, 2 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c > > index b488f77..f770f59 100644 > > --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c > > +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c > > @@ -2142,9 +2142,10 @@ #ifdef CONFIG_BCM947XX > > if (bcm->pci_dev->bus->number == 0) { > > struct pci_dev *d = NULL; > > /* FIXME: we will probably need more device IDs here... */ > > - d = pci_find_device(PCI_VENDOR_ID_BROADCOM, 0x4324, NULL); > > + d = pci_get_device(PCI_VENDOR_ID_BROADCOM, 0x4324, NULL); > > if (d != NULL) { > > bcm->irq = d->irq; > > + pci_dev_put(d); > > Given the FIXME, if you are going to touch this area, it seems logical > to add a PCI device match table. Yes, you may want to discuss that with the openwrt people, as this code is only openwrt related.