netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Greg KH <gregkh@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-pci@atrey.karlin.mff.cuni.cz, netdev@vger.kernel.org,
	stevel@mvista.com, source@mvista.com
Subject: Re: [PATCH 3/3] pci: gt96100eth avoid pci_find_device
Date: Thu, 25 May 2006 20:37:55 -0400	[thread overview]
Message-ID: <44764DE3.5090506@pobox.com> (raw)
In-Reply-To: <20060526001155.4828DC7C5E@atrey.karlin.mff.cuni.cz>

Jiri Slaby wrote:
> gt96100eth avoid pci_find_device
> 
> Change pci_find_device to safer pci_get_device.
> 
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
> 
> ---
> commit f656671e9da9d33bd7a2fb3f5c0d0f7009925698
> tree b92c808b6a9eecce58b0f7b0ffe1237631dbd65a
> parent 1d3b6caf027fe53351c645523587aeac40bc3e47
> author Jiri Slaby <ku@bellona.localdomain> Fri, 26 May 2006 01:55:23 +0159
> committer Jiri Slaby <ku@bellona.localdomain> Fri, 26 May 2006 01:55:23 +0159
> 
>  drivers/net/gt96100eth.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/gt96100eth.c b/drivers/net/gt96100eth.c
> index 2d24354..beac56d 100644
> --- a/drivers/net/gt96100eth.c
> +++ b/drivers/net/gt96100eth.c
> @@ -613,9 +613,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;

Seems OK to me, though you may wish to use a pci_device_id list with 
pci_match_[one_]device() here too.

	Jeff




       reply	other threads:[~2006-05-26  0:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060526001155.4828DC7C5E@atrey.karlin.mff.cuni.cz>
2006-05-26  0:37 ` Jeff Garzik [this message]
     [not found] <448491ab.7fb59b32.690f.01c1SMTPIN_ADDED@mx.gmail.com>
2006-06-05 20:57 ` [PATCH 3/3] pci: gt96100eth avoid pci_find_device Jiri Slaby

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=44764DE3.5090506@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=gregkh@suse.de \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=netdev@vger.kernel.org \
    --cc=source@mvista.com \
    --cc=stevel@mvista.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).