i2c-viapro.c: Move definition of PCI IDs before they are used.

This fixes compilation with old kernels (2.4.20 and earlier). Thanks
to Yuan Mu for reporting.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4039 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2006-06-05 07:55:07 +00:00
1 parent 0fc147568d
commit e6ba14f1bf
2 files changed
+14 -12

No files matched your search

+1
View File
@@ -15,6 +15,7 @@ lm_sensors CHANGES file
Module i2c-i801: Disable PEC mode after every transaction (2.6 backport)
Add ICH8 support (2.6 backport)
Module i2c-piix4: Add ServerWorks HT-1000 support (2.6 backport)
Module i2c-viapro: Fix compilation with kernels < 2.4.21
Module w83781d: Use real-time alarm registers when possible (2.6 backport)
Program decode-dimms.pl: Decode depending on the memory type
Decode the manufacturing date to an ISO8601 date
+13 -12
View File
@@ -49,6 +49,19 @@
#include "version.h"
#include "sensors_compat.h"
/* 8233A is undefined before kernel 2.4.19 */
#ifndef PCI_DEVICE_ID_VIA_8233A
#define PCI_DEVICE_ID_VIA_8233A 0x3147
#endif
/* 8235 is undefined before kernel 2.4.21 */
#ifndef PCI_DEVICE_ID_VIA_8235
#define PCI_DEVICE_ID_VIA_8235 0x3177
#endif
/* 8237 is undefined before kernel 2.4.21 */
#ifndef PCI_DEVICE_ID_VIA_8237
#define PCI_DEVICE_ID_VIA_8237 0x3227
#endif
#define SMBBA1 0x90
#define SMBBA2 0x80
#define SMBBA3 0xD0
@@ -420,18 +433,6 @@ release_region:
return error;
}
/* 8233A is undefined before kernel 2.4.19 */
#ifndef PCI_DEVICE_ID_VIA_8233A
#define PCI_DEVICE_ID_VIA_8233A 0x3147
#endif
/* 8235 is undefined before kernel 2.4.20 */
#ifndef PCI_DEVICE_ID_VIA_8235
#define PCI_DEVICE_ID_VIA_8235 0x3177
#endif
/* 8237 is undefined before kernel 2.4.21 */
#ifndef PCI_DEVICE_ID_VIA_8237
#define PCI_DEVICE_ID_VIA_8237 0x3227
#endif
static struct pci_device_id vt596_ids[] __initdata = {
{
.vendor = PCI_VENDOR_ID_VIA,