From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Wed, 17 May 2006 00:18:24 +0000 Subject: Re: [KJ] [PATCH] drivers/char/istallion.c : change pci_find_device by Message-Id: <20060517001824.GC6355@kroah.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1870554843220007==" List-Id: References: <446A4ADA.3070606@yahoo.fr> In-Reply-To: <446A4ADA.3070606@yahoo.fr> To: kernel-janitors@vger.kernel.org --===============1870554843220007== Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 17, 2006 at 12:45:54AM +0200, trem wrote: > From: trem > > This patch simply change pci_find_device by pci_get_device, because > pci_find_device is deprecated. pci_dev_put has been added to decrement > the counter, so unload could be done. I've added a pci_dev_put(dev) > before the return to avoid missing one device (thanks greg k-h for the > remark) > > Signed-Off-By: trem > --- > > diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c > index ef20c1f..b10eea7 100644 > --- a/drivers/char/istallion.c > +++ b/drivers/char/istallion.c > @@ -4576,10 +4576,13 @@ static int stli_findpcibrds(void) > printk("stli_findpcibrds()\n"); > #endif > > - while ((dev = pci_find_device(PCI_VENDOR_ID_STALLION, > + while ((dev = pci_get_device(PCI_VENDOR_ID_STALLION, > PCI_DEVICE_ID_ECRA, dev))) { > - if ((rc = stli_initpcibrd(BRD_ECPPCI, dev))) > + if ((rc = stli_initpcibrd(BRD_ECPPCI, dev))) { > + pci_dev_put(dev); > return(rc); > + } > + pci_dev_put(dev); No, this is still wrong. Please read the documentation on how to use this function. thanks, greg k-h --===============1870554843220007== Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline _______________________________________________ Kernel-janitors mailing list Kernel-janitors@lists.osdl.org https://lists.osdl.org/mailman/listinfo/kernel-janitors --===============1870554843220007==--