From: Jeff Garzik <jgarzik@pobox.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Scott Feldman <sfeldma@pobox.com>,
netdev@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] gt96100: stop using pci_find_device()
Date: Wed, 14 Sep 2005 15:00:58 -0400 [thread overview]
Message-ID: <4328736A.8040803@pobox.com> (raw)
In-Reply-To: <20050914185136.GE19491@mipter.zuzino.mipt.ru>
Alexey Dobriyan wrote:
> From: Scott Feldman <sfeldma@pobox.com>
>
> Replace pci_find_device with pci_get_device/pci_dev_put to plug race
> with pci_find_device.
>
> Signed-off-by: Scott Feldman <sfeldma@pobox.com>
> Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
> Signed-off-by: Domen Puncer <domen@coderock.org>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
>
> drivers/net/gt96100eth.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> --- a/drivers/net/gt96100eth.c
> +++ b/drivers/net/gt96100eth.c
> @@ -615,9 +615,9 @@ static int gt96100_init_module(void)
> /*
> * Stupid probe because this really isn't a PCI device
> */
> - if (!(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
> + if (!(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
> PCI_DEVICE_ID_MARVELL_GT96100, NULL)) &&
> - !(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
> + !(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
> PCI_DEVICE_ID_MARVELL_GT96100A, NULL))) {
> printk(KERN_ERR __FILE__ ": GT96100 not found!\n");
> return -ENODEV;
> @@ -627,12 +627,14 @@ static int gt96100_init_module(void)
> if (cpuConfig & (1<<12)) {
> printk(KERN_ERR __FILE__
> ": must be in Big Endian mode!\n");
> + pci_dev_put(pci);
> return -ENODEV;
NAK -- convert it to use standard PCI driver API.
Jeff
next prev parent reply other threads:[~2005-09-14 19:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-14 18:51 [PATCH] gt96100: stop using pci_find_device() Alexey Dobriyan
2005-09-14 19:00 ` Jeff Garzik [this message]
2005-09-14 19:40 ` Ralf Baechle
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=4328736A.8040803@pobox.com \
--to=jgarzik@pobox.com \
--cc=adobriyan@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=netdev@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=sfeldma@pobox.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).