From: Greg KH <greg@kroah.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] change pci_find_device to pci_get_device,
Date: Tue, 17 Jul 2007 00:09:47 +0000 [thread overview]
Message-ID: <20070717000946.GA6068@kroah.com> (raw)
In-Reply-To: <11845693593123-git-send-email-crquan@gmail.com>
On Mon, Jul 16, 2007 at 10:53:33PM +0800, rae l wrote:
> On 7/16/07, Matthew Wilcox <matthew@wil.cx> wrote:
> > On Mon, Jul 16, 2007 at 03:02:39PM +0800, Denis Cheng wrote:
> > > @@ -4453,7 +4453,7 @@ advansys_detect(struct scsi_host_template *tpnt)
> > >
> > > /* Find all PCI cards. */
> > > while (pci_device_id_cnt < ASC_PCI_DEVICE_ID_CNT) {
> > > - if ((pci_devp =
> > pci_find_device(PCI_VENDOR_ID_ASP,
> > > + if ((pci_devp =
> > pci_get_device(PCI_VENDOR_ID_ASP,
> > > pci_device_id[pci_device_id_cnt], pci_devp))
> > =
> > > NULL) {
> > > pci_device_id_cnt++;
> > > --
> >
> > Where do you drop the reference to the PCI device again?
> I don't know how to solve this problem, I just want to do some kernel
> janitors project to contribute to the linux kernel, I'm just a kernel
> newbie;
> Because the pci_find_device is deprecated, the comments in this
> function said, please use pci_get_device instead; but pci_get_device
> called here return a (struct pci_dev *) to a local variable, someone
> could tell me when to call pci_put_device?
Please read the comments for the pci_get_device() function to fully
understand why people have not just gone through and done a simple
search-and-replace action for the whole kernel tree. It is much more
complex than that.
good luck,
greg k-h
next prev parent reply other threads:[~2007-07-17 0:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-16 7:02 [PATCH] change pci_find_device to pci_get_device, Denis Cheng
2007-07-16 7:06 ` rae l
2007-07-16 11:14 ` Matthew Wilcox
2007-07-16 14:53 ` rae l
2007-07-16 15:03 ` Matthew Wilcox
2007-07-17 0:09 ` Greg KH [this message]
2007-07-17 1:30 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070717000946.GA6068@kroah.com \
--to=greg@kroah.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.