Last fixes in piix4.o

* Cleanup bug (ioports were not deregistered)
* PIIX4 search (it seems that for function 3, we must seek for a slightly
  different device, too).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@35 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 1998-12-05 01:03:03 +00:00
1 parent f18d210815
commit 6b510ea008
2 files changed
+10 -8

No files matched your search

+5 -4
View File
@@ -109,16 +109,17 @@ int piix4_setup(void)
PIIX4_dev = NULL;
do
PIIX4_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82371AB_0, PIIX4_dev);
PCI_DEVICE_ID_INTEL_82371AB_3, PIIX4_dev);
while(PIIX4_dev && (PCI_FUNC(PIIX4_dev->devfn) != 3);
if(PIIX4_dev == NULL) {
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54) */
for (i = 0;
! (res = pcibios_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82371AB_0,
PCI_DEVICE_ID_INTEL_82371AB_3,
i,&PIIX4_bus, &PIIX4_devfn)) &&
PCI_FUNC(PIIX4_devfn) != 3;
i++);
if (res) {
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) */
printk("piix4.o: Error: Can't detect PIIX4, function 3!\n");
@@ -399,11 +400,11 @@ int piix4_cleanup(void)
printk("piix4.o: smbus_del_adapter failed, module not removed\n");
return res;
} else
piix4_initialized=0;
piix4_initialized--;
}
if (piix4_initialized >= 1) {
release_region(piix4_smba, 8);
piix4_initialized=0;
piix4_initialized--;
}
return 0;
}
+5 -4
View File
@@ -109,16 +109,17 @@ int piix4_setup(void)
PIIX4_dev = NULL;
do
PIIX4_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82371AB_0, PIIX4_dev);
PCI_DEVICE_ID_INTEL_82371AB_3, PIIX4_dev);
while(PIIX4_dev && (PCI_FUNC(PIIX4_dev->devfn) != 3);
if(PIIX4_dev == NULL) {
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54) */
for (i = 0;
! (res = pcibios_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82371AB_0,
PCI_DEVICE_ID_INTEL_82371AB_3,
i,&PIIX4_bus, &PIIX4_devfn)) &&
PCI_FUNC(PIIX4_devfn) != 3;
i++);
if (res) {
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) */
printk("piix4.o: Error: Can't detect PIIX4, function 3!\n");
@@ -399,11 +400,11 @@ int piix4_cleanup(void)
printk("piix4.o: smbus_del_adapter failed, module not removed\n");
return res;
} else
piix4_initialized=0;
piix4_initialized--;
}
if (piix4_initialized >= 1) {
release_region(piix4_smba, 8);
piix4_initialized=0;
piix4_initialized--;
}
return 0;
}