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:25:23 -0700 [thread overview]
Message-ID: <20040928172523.GB29529@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 cyrix.c patch.
-------
PCI: change cyrix.c driver 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/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c
--- a/arch/i386/kernel/cpu/cyrix.c 2004-09-28 10:21:10 -07:00
+++ b/arch/i386/kernel/cpu/cyrix.c 2004-09-28 10:21:10 -07:00
@@ -187,12 +187,19 @@
}
+#ifdef CONFIG_PCI
+static struct pci_device_id cyrix_55x0[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510) },
+ { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520) },
+ { },
+};
+#endif
+
static void __init init_cyrix(struct cpuinfo_x86 *c)
{
unsigned char dir0, dir0_msn, dir0_lsn, dir1 = 0;
char *buf = c->x86_model_id;
const char *p = NULL;
- struct pci_dev *dev;
/* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
@@ -275,16 +282,8 @@
/*
* The 5510/5520 companion chips have a funky PIT.
*/
- dev = pci_get_device(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510, NULL);
- if (dev) {
- pci_dev_put(dev);
- pit_latch_buggy = 1;
- }
- dev = pci_get_device(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, NULL);
- if (dev) {
- pci_dev_put(dev);
+ if (pci_dev_present(cyrix_55x0))
pit_latch_buggy = 1;
- }
/* GXm supports extended cpuid levels 'ala' AMD */
if (c->cpuid_level == 2) {
next prev parent reply other threads:[~2004-09-28 17:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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:50 ` Greg KH
2004-09-24 19:02 ` Christoph Hellwig
2004-09-24 21:19 ` Greg KH
2004-09-24 21:00 ` Alan Cox
2004-09-26 14:10 ` Greg KH
2004-09-28 17:24 ` Greg KH
2004-09-28 17:25 ` Greg KH [this message]
2004-09-28 17:26 ` Greg KH
2004-09-24 21:26 ` [PATCH 2.6.9-rc2-mm2] " H. Peter Anvin
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=20040928172523.GB29529@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox