Re: [PATCH] PCI fixes for 2.6.9

From: Greg KH
Date: Wed Oct 20 2004 - 07:36:49 EST


ChangeSet 1.1997.37.44, 2004/10/06 13:05:44-07:00, greg@xxxxxxxxx

[PATCH] PCI: change cyrix.c driver to use pci_dev_present

Signed-off-by: Hanna Linder <hannal@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>


arch/i386/kernel/cpu/cyrix.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)


diff -Nru a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c
--- a/arch/i386/kernel/cpu/cyrix.c 2004-10-19 15:23:42 -07:00
+++ b/arch/i386/kernel/cpu/cyrix.c 2004-10-19 15:23:42 -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) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/