Changeset 4039

Show
Ignore:
Timestamp:
06/05/06 09:55:07 (7 years ago)
Author:
khali
Message:

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.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r4037 r4039  
    1616                   Add ICH8 support (2.6 backport) 
    1717  Module i2c-piix4: Add ServerWorks HT-1000 support (2.6 backport) 
     18  Module i2c-viapro: Fix compilation with kernels < 2.4.21 
    1819  Module w83781d: Use real-time alarm registers when possible (2.6 backport) 
    1920  Program decode-dimms.pl: Decode depending on the memory type 
  • lm-sensors/trunk/kernel/busses/i2c-viapro.c

    r3164 r4039  
    4949#include "version.h" 
    5050#include "sensors_compat.h" 
     51 
     52/* 8233A is undefined before kernel 2.4.19 */ 
     53#ifndef PCI_DEVICE_ID_VIA_8233A 
     54#define PCI_DEVICE_ID_VIA_8233A 0x3147 
     55#endif 
     56/* 8235 is undefined before kernel 2.4.21 */ 
     57#ifndef PCI_DEVICE_ID_VIA_8235 
     58#define PCI_DEVICE_ID_VIA_8235  0x3177 
     59#endif 
     60/* 8237 is undefined before kernel 2.4.21 */ 
     61#ifndef PCI_DEVICE_ID_VIA_8237 
     62#define PCI_DEVICE_ID_VIA_8237  0x3227 
     63#endif 
    5164 
    5265#define SMBBA1          0x90 
     
    421434} 
    422435 
    423 /* 8233A is undefined before kernel 2.4.19 */ 
    424 #ifndef PCI_DEVICE_ID_VIA_8233A 
    425 #define PCI_DEVICE_ID_VIA_8233A 0x3147 
    426 #endif 
    427 /* 8235 is undefined before kernel 2.4.20 */ 
    428 #ifndef PCI_DEVICE_ID_VIA_8235 
    429 #define PCI_DEVICE_ID_VIA_8235  0x3177 
    430 #endif 
    431 /* 8237 is undefined before kernel 2.4.21 */ 
    432 #ifndef PCI_DEVICE_ID_VIA_8237 
    433 #define PCI_DEVICE_ID_VIA_8237  0x3227 
    434 #endif 
    435436static struct pci_device_id vt596_ids[] __initdata = { 
    436437        {