From: Greg KH <greg@kroah.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Christoph Hellwig <hch@infradead.org>,
davej@codemonkey.org.uk, hpa@zytor.com,
kernel-janitors@lists.osdl.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Hanna Linder <hannal@us.ibm.com>
Subject: [Kernel-janitors] Re: Create new function to see if pci dev is
Date: Tue, 28 Sep 2004 17:26:07 +0000 [thread overview]
Message-ID: <20040928172607.GC29529@kroah.com> (raw)
In-Reply-To: <20040928172426.GA29529@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]
On Tue, Sep 28, 2004 at 10:24:26AM -0700, Greg KH wrote:
> Ok, here's the patch that I applied to my trees, and I'll follow this up
> with a conversion of Hanna's two patches that I respun to use the new
> parameters of this function.
Here's the irq.c patch:
----------
PCI: change irq.c to use pci_dev_present
Signed-off-by: Hanna Linder <hannal@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
diff -Nru a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
--- a/arch/i386/pci/irq.c 2004-09-28 10:21:40 -07:00
+++ b/arch/i386/pci/irq.c 2004-09-28 10:21:40 -07:00
@@ -452,21 +452,17 @@
#endif
-
static __init int intel_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
{
- struct pci_dev *dev1, *dev2;
+ static struct pci_device_id pirq_440gx[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0) },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_2) },
+ { },
+ };
/* 440GX has a proprietary PIRQ router -- don't use it */
- dev1 = pci_get_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_82443GX_0, NULL);
- dev2 = pci_get_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_82443GX_2, NULL);
- if ((dev1 != NULL) || (dev2 != NULL)) {
- pci_dev_put(dev1);
- pci_dev_put(dev2);
+ if (pci_dev_present(pirq_440gx))
return 0;
- }
switch(device)
{
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Christoph Hellwig <hch@infradead.org>,
davej@codemonkey.org.uk, hpa@zytor.com,
kernel-janitors@lists.osdl.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Hanna Linder <hannal@us.ibm.com>
Subject: Re: Create new function to see if pci dev is present
Date: Tue, 28 Sep 2004 10:26:07 -0700 [thread overview]
Message-ID: <20040928172607.GC29529@kroah.com> (raw)
In-Reply-To: <20040928172426.GA29529@kroah.com>
On Tue, Sep 28, 2004 at 10:24:26AM -0700, Greg KH wrote:
> Ok, here's the patch that I applied to my trees, and I'll follow this up
> with a conversion of Hanna's two patches that I respun to use the new
> parameters of this function.
Here's the irq.c patch:
----------
PCI: change irq.c to use pci_dev_present
Signed-off-by: Hanna Linder <hannal@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
diff -Nru a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
--- a/arch/i386/pci/irq.c 2004-09-28 10:21:40 -07:00
+++ b/arch/i386/pci/irq.c 2004-09-28 10:21:40 -07:00
@@ -452,21 +452,17 @@
#endif
-
static __init int intel_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
{
- struct pci_dev *dev1, *dev2;
+ static struct pci_device_id pirq_440gx[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0) },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_2) },
+ { },
+ };
/* 440GX has a proprietary PIRQ router -- don't use it */
- dev1 = pci_get_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_82443GX_0, NULL);
- dev2 = pci_get_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_82443GX_2, NULL);
- if ((dev1 != NULL) || (dev2 != NULL)) {
- pci_dev_put(dev1);
- pci_dev_put(dev2);
+ if (pci_dev_present(pirq_440gx))
return 0;
- }
switch(device)
{
next prev parent reply other threads:[~2004-09-28 17:26 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-23 22:26 [Kernel-janitors] [PATCH 2.6.9-rc2-mm2] Create new function to see Hanna Linder
2004-09-23 22:26 ` [PATCH 2.6.9-rc2-mm2] Create new function to see if pci dev is present Hanna Linder
2004-09-23 22:28 ` [Kernel-janitors] [PATCH 2.6.9-rc2-mm2] Change cyrix.c driver to Hanna Linder
2004-09-23 22:28 ` [PATCH 2.6.9-rc2-mm2] Change cyrix.c driver to use new pci_dev_present Hanna Linder
2004-09-23 22:28 ` [Kernel-janitors] [PATCH 2.6.9-rc2-mm2] Change irq.c driver to use Hanna Linder
2004-09-23 22:28 ` [PATCH 2.6.9-rc2-mm2] Change irq.c driver to use new pci_dev_present Hanna Linder
2004-09-23 22:50 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2-mm2] Create new function to Greg KH
2004-09-23 22:50 ` [PATCH 2.6.9-rc2-mm2] Create new function to see if pci dev is present Greg KH
2004-10-02 5:35 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2-mm4 pci_bus_cvlink.c] Judith Lebzelter
2004-10-02 5:35 ` [PATCH 2.6.9-rc2-mm4 pci_bus_cvlink.c] Replace pci_find_device with pci_get_device Judith Lebzelter
2004-09-24 19:02 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2-mm2] Create new function to Christoph Hellwig
2004-09-24 19:02 ` [PATCH 2.6.9-rc2-mm2] Create new function to see if pci dev is present Christoph Hellwig
2004-09-24 21:19 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2-mm2] Create new function to Greg KH
2004-09-24 21:19 ` [PATCH 2.6.9-rc2-mm2] Create new function to see if pci dev is present Greg KH
2004-09-24 21:00 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2-mm2] Create new function to Alan Cox
2004-09-24 21:00 ` [PATCH 2.6.9-rc2-mm2] Create new function to see if pci dev is present Alan Cox
2004-09-26 14:10 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2-mm2] Create new function to Greg KH
2004-09-26 14:10 ` [PATCH 2.6.9-rc2-mm2] Create new function to see if pci dev is present Greg KH
2004-09-28 17:24 ` [Kernel-janitors] Re: Create new function to see if pci dev is Greg KH
2004-09-28 17:24 ` Create new function to see if pci dev is present Greg KH
2004-09-28 17:25 ` [Kernel-janitors] Re: Create new function to see if pci dev is Greg KH
2004-09-28 17:25 ` Create new function to see if pci dev is present Greg KH
2004-09-28 17:26 ` Greg KH [this message]
2004-09-28 17:26 ` Greg KH
2004-09-24 21:26 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2-mm2] Create new function to H. Peter Anvin
2004-09-24 21:26 ` [PATCH 2.6.9-rc2-mm2] Create new function to see if pci dev is present H. Peter Anvin
-- strict thread matches above, loose matches on Subject: below --
2004-10-01 18:10 [Kernel-janitors] [PATCH 2.6.9-rc2-mm4 pci_bus_cvlink.c] Replace Hanna Linder
2004-10-01 18:10 ` [PATCH 2.6.9-rc2-mm4 pci_bus_cvlink.c] Replace pci_find_device with pci_get_device Hanna Linder
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=20040928172607.GC29529@kroah.com \
--to=greg@kroah.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davej@codemonkey.org.uk \
--cc=hannal@us.ibm.com \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-kernel@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.