From: Christoph Hellwig <hch@infradead.org>
To: "chas williams (contractor)" <chas@cmf.nrl.navy.mil>
Cc: netdev@oss.sgi.com
Subject: Re: how about the following to elminate pci_find_device() in fore200e?
Date: Mon, 25 Oct 2004 13:56:48 +0100 [thread overview]
Message-ID: <20041025125648.GA32619@infradead.org> (raw)
In-Reply-To: <200410251156.i9PBuwV6016648@ginger.cmf.nrl.navy.mil>
On Mon, Oct 25, 2004 at 07:56:59AM -0400, chas williams (contractor) wrote:
> we need to keep the linked list around for the sbus devices. there doesnt
> seem to be something similar to pci_module_init() for sbus devices.
>
> ===== drivers/atm/fore200e.c 1.30 vs edited =====
> --- 1.30/drivers/atm/fore200e.c 2004-07-29 18:27:53 -04:00
> +++ edited/drivers/atm/fore200e.c 2004-10-24 22:12:20 -04:00
> @@ -113,7 +113,7 @@
> static const struct atmdev_ops fore200e_ops;
> static const struct fore200e_bus fore200e_bus[];
>
> -static struct fore200e* fore200e_boards = NULL;
> +LIST_HEAD(fore200e_boards);
should still be static (yes, static LIST_HEAD(foo); is okay)
> +static int __devinit
> +fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
> +{
> + const struct fore200e_bus* bus = (struct fore200e_bus*) pci_ent->driver_data;
> + struct fore200e* fore200e;
> + int err = 0;
> + static int index = 0;
> +
> + if (pci_enable_device(pci_dev)) {
> + err = -EINVAL;
> + goto out;
> + }
>
indentation looks messed but, but I assume you did this to match the
rest of the file?
> +#ifdef CONFIG_ATM_FORE200E_PCA
> + if (!pci_module_init(&fore200e_pca_driver))
> + return 0;
> +#endif
> +
> + if (!list_empty(&fore200e_boards))
> + return 0;
the driver only supports either sbus or pci at the same time?
next prev parent reply other threads:[~2004-10-25 12:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-25 11:56 how about the following to elminate pci_find_device() in fore200e? chas williams (contractor)
2004-10-25 12:56 ` Christoph Hellwig [this message]
2004-10-25 13:31 ` chas williams (contractor)
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=20041025125648.GA32619@infradead.org \
--to=hch@infradead.org \
--cc=chas@cmf.nrl.navy.mil \
--cc=netdev@oss.sgi.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).