Changeset 705

Show
Ignore:
Timestamp:
01/24/00 21:07:29 (15 years ago)
Author:
frodo
Message:

Removing kernel 2.0 and 2.1 compatibility pass 2

Eliminated compat.h

Location:
lm-sensors/trunk/kernel
Files:
1 removed
27 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/busses/i2c-ali15x3.c

    r704 r705  
    7171#include <linux/i2c.h> 
    7272#include "version.h" 
    73 #include "compat.h" 
    7473 
    7574#include <linux/init.h> 
     
    216215   are zero unless you clear the lock bits. 
    217216*/ 
    218   pci_read_config_byte_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn, 
    219                               SMBATPC, &temp); 
     217  pci_read_config_byte(ALI15X3_dev, SMBATPC, &temp); 
    220218  if(temp & ALI15X3_LOCK) 
    221219  {    
    222220    temp &= ~ALI15X3_LOCK; 
    223     pci_write_config_byte_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn, 
    224                                  SMBATPC, temp); 
     221    pci_write_config_byte(ALI15X3_dev, SMBATPC, temp); 
    225222  } 
    226223 
    227224/* Determine the address of the SMBus area */ 
    228   pci_read_config_word_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn, 
    229                               SMBBA,&ali15x3_smba); 
     225  pci_read_config_word(ALI15X3_dev, SMBBA,&ali15x3_smba); 
    230226  ali15x3_smba &= (0xffff & ~ (ALI15X3_SMB_IOSIZE - 1)); 
    231227  if(ali15x3_smba == 0) { 
     
    246242 
    247243/* check if whole device is enabled */ 
    248     pci_read_config_byte_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn, 
    249                                 SMBCOM, &temp); 
     244    pci_read_config_byte(ALI15X3_dev, SMBCOM, &temp); 
    250245  if ((temp & 1) == 0) { 
    251246    printk("SMBUS: Error: SMB device not enabled - upgrade BIOS?\n");      
     
    255250 
    256251/* Is SMB Host controller enabled? */ 
    257   pci_read_config_byte_united(ALI15X3_dev, ALI15X3_bus, ALI15X3_devfn, 
    258                               SMBHSTCFG, &temp); 
     252  pci_read_config_byte(ALI15X3_dev, SMBHSTCFG, &temp); 
    259253#ifdef FORCE_ALI15X3_ENABLE 
    260254/* This should never need to be done. 
     
    264258   resorting to this.  */ 
    265259  if ((temp & 1) == 0) { 
    266     pci_write_config_byte_united(ALI15X3_dev, ALI15X3_bus, ALI15X3_devfn, 
    267                                      SMBHSTCFG, temp | 1); 
     260    pci_write_config_byte(ALI15X3_dev, SMBHSTCFG, temp | 1); 
    268261    printk("i2c-ali15x3.o: WARNING: ALI15X3 SMBus interface has been FORCEFULLY " 
    269262           "ENABLED!!\n"); 
     
    278271 
    279272/* set SMB clock to 74KHz as recommended in data sheet */ 
    280   pci_write_config_byte_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn, 
    281                                SMBCLK, 0x20); 
     273  pci_write_config_byte(ALI15X3_dev, SMBCLK, 0x20); 
    282274 
    283275  /* Everything is happy, let's grab the memory and set things up. */ 
     
    292284     printk("i2c-ali15x3.o: ALI15X3 using Interrupt 9 for SMBus.\n"); 
    293285*/ 
    294   pci_read_config_byte_united(ALI15X3_dev, ALI15X3_bus, ALI15X3_devfn, SMBREV,  
    295                               &temp); 
     286  pci_read_config_byte(ALI15X3_dev,  SMBREV, &temp); 
    296287  printk("i2c-ali15x3.o: SMBREV = 0x%X\n",temp); 
    297288  printk("i2c-ali15x3.o: ALI15X3_smba = 0x%X\n",ali15x3_smba); 
  • lm-sensors/trunk/kernel/busses/i2c-amd756.c

    r704 r705  
    3737#include <linux/i2c.h> 
    3838#include "version.h" 
    39 #include "compat.h" 
    4039 
    4140#include <linux/init.h> 
     
    161160 
    162161  /* Technically it is a dword but... */ 
    163   pci_read_config_word_united(AMD756_dev, AMD756_bus, AMD756_devfn, 
    164                               SMBBA, &amd756_smba); 
     162  pci_read_config_word(AMD756_dev, SMBBA, &amd756_smba); 
    165163  amd756_smba &= 0xfff0; 
    166164 
     
    171169  } 
    172170 
    173   pci_read_config_byte_united(AMD756_dev, AMD756_bus, AMD756_devfn, 
    174                               SMBGCFG, &temp); 
     171  pci_read_config_byte(AMD756_dev, SMBGCFG, &temp); 
    175172 
    176173  if ((temp & 128) == 0) { 
     
    194191  */ 
    195192 
    196   pci_read_config_byte_united(AMD756_dev, AMD756_bus, AMD756_devfn, SMBREV,  
    197                               &temp); 
     193  pci_read_config_byte(AMD756_dev, SMBREV, &temp); 
    198194  printk("i2c-amd756.o: SMBREV = 0x%X\n",temp); 
    199195  printk("i2c-amd756.o: AMD756_smba = 0x%X\n",amd756_smba); 
  • lm-sensors/trunk/kernel/busses/i2c-hydra.c

    r704 r705  
    3535#include <linux/i2c.h> 
    3636#include <linux/i2c-algo-bit.h> 
    37 #include "compat.h" 
    3837 
    3938#include <linux/init.h> 
  • lm-sensors/trunk/kernel/busses/i2c-i801.c

    r704 r705  
    3636#include <linux/sched.h> 
    3737#include <linux/ioport.h> 
     38#include <linux/init.h> 
    3839#include <linux/i2c.h> 
    3940#include "version.h" 
    40 #include "compat.h" 
     41 
     42#ifndef PCI_DEVICE_ID_INTEL_82801AA_3 
     43#define PCI_DEVICE_ID_INTEL_82801AA_3   0x2413 
     44#endif 
     45#ifndef PCI_DEVICE_ID_INTEL_82801AB_3 
     46#define PCI_DEVICE_ID_INTEL_82801AB_3   0x2423 
     47#endif 
    4148 
    4249/* I801 SMBus address offsets */ 
     
    169176    force = 0; 
    170177  } else { 
    171     pci_read_config_word_united(I801_dev, I801_bus ,I801_devfn, 
    172                                 SMBBA,&i801_smba); 
     178    pci_read_config_word(I801_dev, SMBBA,&i801_smba); 
    173179    i801_smba &= 0xfff0; 
    174180  } 
     
    180186  } 
    181187 
    182   pci_read_config_byte_united(I801_dev, I801_bus, I801_devfn, 
    183                               SMBHSTCFG, &temp); 
     188  pci_read_config_byte(I801_dev, SMBHSTCFG, &temp); 
    184189/* If force_addr is set, we program the new address here. Just to make 
    185190   sure, we disable the I801 first. */ 
    186191  if (force_addr) { 
    187     pci_write_config_byte_united(I801_dev, I801_bus, I801_devfn, 
    188                                 SMBHSTCFG, temp & 0xfe); 
    189     pci_write_config_word_united(I801_dev, I801_bus ,I801_devfn, 
    190                                  SMBBA,i801_smba); 
    191     pci_write_config_byte_united(I801_dev, I801_bus, I801_devfn, 
    192                                 SMBHSTCFG, temp | 0x01); 
     192    pci_write_config_byte(I801_dev, SMBHSTCFG, temp & 0xfe); 
     193    pci_write_config_word(I801_dev, SMBBA,i801_smba); 
     194    pci_write_config_byte(I801_dev, SMBHSTCFG, temp | 0x01); 
    193195    printk("i2c-i801.o: WARNING: I801 SMBus interface set to new " 
    194196           "address %04x!\n",i801_smba); 
     
    201203   things after enabling this. :') Check for Bios updates before 
    202204   resorting to this.  */ 
    203       pci_write_config_byte_united(I801_dev, I801_bus, I801_devfn, 
    204                                        SMBHSTCFG, temp | 1); 
     205      pci_write_config_byte(I801_dev, SMBHSTCFG, temp | 1); 
    205206      printk("i2c-i801.o: WARNING: I801 SMBus interface has been FORCEFULLY " 
    206207             "ENABLED!\n"); 
     
    223224     printk("i2c-i801.o: I801 using PCI Interrupt for SMBus.\n"); 
    224225 
    225   pci_read_config_byte_united(I801_dev, I801_bus, I801_devfn, SMBREV,  
    226                               &temp); 
     226  pci_read_config_byte(I801_dev, SMBREV, &temp); 
    227227  printk("i2c-i801.o: SMBREV = 0x%X\n",temp); 
    228228  printk("i2c-i801.o: I801_smba = 0x%X\n",i801_smba); 
  • lm-sensors/trunk/kernel/busses/i2c-isa.c

    r704 r705  
    3131#include <linux/i2c.h> 
    3232 
    33 #include "compat.h" 
    3433 
    3534#include <linux/init.h> 
  • lm-sensors/trunk/kernel/busses/i2c-piix4.c

    r704 r705  
    3232#include <linux/i2c.h> 
    3333#include "version.h" 
    34 #include "compat.h" 
    3534 
    3635#include <linux/init.h> 
     
    169168  } else { 
    170169 
    171     pci_read_config_word_united(PIIX4_dev, PIIX4_bus ,PIIX4_devfn, 
    172                                 SMBBA,&piix4_smba); 
     170    pci_read_config_word(PIIX4_dev, SMBBA,&piix4_smba); 
    173171    piix4_smba &= 0xfff0; 
    174172  } 
     
    180178  } 
    181179 
    182   pci_read_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn, 
    183                               SMBHSTCFG, &temp); 
     180  pci_read_config_byte(PIIX4_dev, SMBHSTCFG, &temp); 
    184181/* If force_addr is set, we program the new address here. Just to make 
    185182   sure, we disable the PIIX4 first. */ 
    186183  if (force_addr) { 
    187     pci_write_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn, 
    188                                 SMBHSTCFG, temp & 0xfe); 
    189     pci_write_config_word_united(PIIX4_dev, PIIX4_bus ,PIIX4_devfn, 
    190                                  SMBBA,piix4_smba); 
    191     pci_write_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn, 
    192                                 SMBHSTCFG, temp | 0x01); 
     184    pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp & 0xfe); 
     185    pci_write_config_word(PIIX4_dev, SMBBA,piix4_smba); 
     186    pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp | 0x01); 
    193187    printk("i2c-piix4.o: WARNING: PIIX4 SMBus interface set to new " 
    194188           "address %04x!\n",piix4_smba); 
     
    201195   things after enabling this. :') Check for Bios updates before 
    202196   resorting to this.  */ 
    203       pci_write_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn, 
    204                                        SMBHSTCFG, temp | 1); 
     197      pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp | 1); 
    205198      printk("i2c-piix4.o: WARNING: PIIX4 SMBus interface has been FORCEFULLY " 
    206199             "ENABLED!\n"); 
     
    224217            "of date)!\n"); 
    225218 
    226   pci_read_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn, SMBREV,  
    227                               &temp); 
     219  pci_read_config_byte(PIIX4_dev, SMBREV, &temp); 
    228220  printk("i2c-piix4.o: SMBREV = 0x%X\n",temp); 
    229221  printk("i2c-piix4.o: PIIX4_smba = 0x%X\n",piix4_smba); 
  • lm-sensors/trunk/kernel/busses/i2c-sis5595.c

    r704 r705  
    3737#include <linux/i2c.h> 
    3838#include "version.h" 
    39 #include "compat.h" 
    4039 
    4140#include <linux/init.h> 
     
    161160 
    162161/* Determine the address of the SMBus areas */ 
    163   pci_read_config_word_united(SIS5595_dev, SIS5595_bus ,SIS5595_devfn, 
    164                                 ACPI_BASE,&sis5595_base); 
     162  pci_read_config_word(SIS5595_dev, ACPI_BASE,&sis5595_base); 
    165163#ifdef DEBUG 
    166164  printk("ACPI Base address: %04x\n",sis5595_base); 
  • lm-sensors/trunk/kernel/busses/i2c-via.c

    r704 r705  
    3232#include <linux/i2c.h> 
    3333#include <linux/i2c-algo-bit.h> 
    34 #include "compat.h" 
    3534 
    3635#include <linux/init.h> 
  • lm-sensors/trunk/kernel/busses/i2c-viapro.c

    r704 r705  
    3232#include <linux/i2c.h> 
    3333#include "version.h" 
    34 #include "compat.h" 
    3534 
    3635#include <linux/init.h> 
     
    181180 
    182181/* Determine the configuration space registers for the SMBus areas */ 
    183   if ((! pci_read_config_word_united(VT596_dev, VT596_bus ,VT596_devfn, 
    184                        SMBBA1, &vt596_smba)) && (vt596_smba & 0x1)) { 
     182  if ((! pci_read_config_word(VT596_dev, SMBBA1, &vt596_smba)) && (vt596_smba & 0x1)) { 
    185183    smb_cf_base = SMBBA1; 
    186184    smb_cf_hstcfg = 0xD2; 
    187   } else if ((! pci_read_config_word_united(VT596_dev, VT596_bus ,VT596_devfn, 
    188                        SMBBA2, &vt596_smba)) && (vt596_smba & 0x1)) { 
     185  } else if ((! pci_read_config_word(VT596_dev, SMBBA2, &vt596_smba)) && (vt596_smba & 0x1)) { 
    189186    smb_cf_base = SMBBA2; 
    190187    smb_cf_hstcfg = 0x84; 
     
    209206  } 
    210207 
    211   pci_read_config_byte_united(VT596_dev, VT596_bus, VT596_devfn, 
    212                               SMBHSTCFG, &temp); 
     208  pci_read_config_byte(VT596_dev, SMBHSTCFG, &temp); 
    213209/* If force_addr is set, we program the new address here. Just to make 
    214210   sure, we disable the VT596 first. */ 
    215211  if (force_addr) { 
    216     pci_write_config_byte_united(VT596_dev, VT596_bus, VT596_devfn, 
    217                                 SMBHSTCFG, temp & 0xfe); 
    218     pci_write_config_word_united(VT596_dev, VT596_bus ,VT596_devfn, 
    219                                  SMBBA,vt596_smba); 
    220     pci_write_config_byte_united(VT596_dev, VT596_bus, VT596_devfn, 
    221                                 SMBHSTCFG, temp | 0x01); 
     212    pci_write_config_byte(VT596_dev, SMBHSTCFG, temp & 0xfe); 
     213    pci_write_config_word(VT596_dev, SMBBA,vt596_smba); 
     214    pci_write_config_byte(VT596_dev, SMBHSTCFG, temp | 0x01); 
    222215    printk("i2c-viapro.o: WARNING: VT596 SMBus interface set to new " 
    223216           "address %04x!\n",vt596_smba); 
     
    228221   things after enabling this. :') Check for Bios updates before 
    229222   resorting to this.  */ 
    230       pci_write_config_byte_united(VT596_dev, VT596_bus, VT596_devfn, 
    231                                        SMBHSTCFG, temp | 1); 
     223      pci_write_config_byte(VT596_dev, SMBHSTCFG, temp | 1); 
    232224      printk("i2c-viapro.o: WARNING: SMBus interface has been FORCEFULLY " 
    233225             "ENABLED!\n"); 
     
    251243            "of date)!\n"); 
    252244 
    253   pci_read_config_byte_united(VT596_dev, VT596_bus, VT596_devfn, SMBREV,  
    254                               &temp); 
     245  pci_read_config_byte(VT596_dev, SMBREV, &temp); 
    255246  printk("i2c-viapro.o: SMBREV = 0x%X\n",temp); 
    256247  printk("i2c-viapro.o: VT596_smba = 0x%X\n",vt596_smba); 
  • lm-sensors/trunk/kernel/busses/i2c-voodoo3.c

    r704 r705  
    4141#include <linux/i2c.h> 
    4242#include "version.h" 
    43 #include "compat.h" 
    4443 
    4544#include <linux/init.h> 
  • lm-sensors/trunk/kernel/chips/adm1021.c

    r704 r705  
    2727#include "i2c-isa.h" 
    2828#include "version.h" 
    29 #include "compat.h" 
    3029 
    3130#include <linux/init.h> 
     31 
     32#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     33#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     34#endif 
     35 
     36#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     37#define THIS_MODULE NULL 
     38#endif 
    3239 
    3340/* Addresses to scan */ 
  • lm-sensors/trunk/kernel/chips/adm9240.c

    r704 r705  
    6262#include "i2c-isa.h" 
    6363#include "sensors.h" 
    64 #include "compat.h" 
    6564#include <linux/init.h> 
    6665 
     66#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     67#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     68#endif 
     69 
     70#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     71#define THIS_MODULE NULL 
     72#endif 
    6773 
    6874/* Addresses to scan */ 
  • lm-sensors/trunk/kernel/chips/bt869.c

    r704 r705  
    2929#include "i2c-isa.h" 
    3030#include "version.h" 
    31 #include "compat.h" 
    3231#include <linux/init.h> 
     32 
     33#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     34#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     35#endif 
     36 
     37#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     38#define THIS_MODULE NULL 
     39#endif 
    3340 
    3441 
  • lm-sensors/trunk/kernel/chips/eeprom.c

    r704 r705  
    2727#include "i2c-isa.h" 
    2828#include "version.h" 
    29 #include "compat.h" 
    3029 
    3130#include <linux/init.h> 
     31 
     32#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     33#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     34#endif 
     35 
     36#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     37#define THIS_MODULE NULL 
     38#endif 
    3239 
    3340/* Addresses to scan */ 
  • lm-sensors/trunk/kernel/chips/gl518sm.c

    r704 r705  
    2828#include "i2c-isa.h" 
    2929#include "version.h" 
    30 #include "compat.h" 
    3130 
    3231#include <linux/init.h> 
     
    3433#ifdef __SMP__ 
    3534#include <linux/smp_lock.h> 
     35#endif 
     36 
     37#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     38#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     39#endif 
     40 
     41#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     42#define THIS_MODULE NULL 
    3643#endif 
    3744 
  • lm-sensors/trunk/kernel/chips/gl520sm.c

    r704 r705  
    2828#include "i2c-isa.h" 
    2929#include "version.h" 
    30 #include "compat.h" 
    31  
    3230#include <linux/init.h> 
     31 
     32#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     33#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     34#endif 
     35 
     36#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     37#define THIS_MODULE NULL 
     38#endif 
    3339 
    3440/* Addresses to scan */ 
  • lm-sensors/trunk/kernel/chips/icspll.c

    r704 r705  
    3838#include <linux/init.h> 
    3939 
     40 
     41#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     42#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     43#endif 
     44 
     45#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     46#define THIS_MODULE NULL 
     47#endif 
    4048 
    4149/* Many constants specified below */ 
  • lm-sensors/trunk/kernel/chips/lm75.c

    r704 r705  
    2626#include "i2c-isa.h" 
    2727#include "version.h" 
    28 #include "compat.h" 
    29  
    3028#include <linux/init.h> 
     29 
     30 
     31#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     32#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     33#endif 
     34 
     35#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     36#define THIS_MODULE NULL 
     37#endif 
    3138 
    3239/* Addresses to scan */ 
  • lm-sensors/trunk/kernel/chips/lm78.c

    r704 r705  
    3232#include "i2c-isa.h" 
    3333#include "sensors.h" 
    34 #include "compat.h" 
    35  
    3634#include <linux/init.h> 
     35 
     36#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     37#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     38#endif 
     39 
     40#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     41#define THIS_MODULE NULL 
     42#endif 
    3743 
    3844/* Addresses to scan */ 
  • lm-sensors/trunk/kernel/chips/lm80.c

    r704 r705  
    3333#include "i2c-isa.h" 
    3434#include "sensors.h" 
    35 #include "compat.h" 
    36  
    3735#include <linux/init.h> 
     36 
     37#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     38#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     39#endif 
     40 
     41#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     42#define THIS_MODULE NULL 
     43#endif 
    3844 
    3945/* Addresses to scan */ 
  • lm-sensors/trunk/kernel/chips/ltc1710.c

    r704 r705  
    4949#include "i2c-isa.h" 
    5050#include "version.h" 
    51 #include "compat.h" 
    52  
    5351#include <linux/init.h> 
     52 
     53 
     54#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     55#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     56#endif 
     57 
     58#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     59#define THIS_MODULE NULL 
     60#endif 
    5461 
    5562/* Addresses to scan */ 
  • lm-sensors/trunk/kernel/chips/matorb.c

    r704 r705  
    3030#include "i2c-isa.h" 
    3131#include "version.h" 
    32 #include "compat.h" 
    33  
    3432#include <linux/init.h> 
     33 
     34#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     35#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     36#endif 
     37 
     38 
     39#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     40#define THIS_MODULE NULL 
     41#endif 
    3542 
    3643/* Addresses to scan */ 
  • lm-sensors/trunk/kernel/chips/maxilife.c

    r704 r705  
    5252#include "sensors.h" 
    5353#include "i2c-isa.h" 
    54 #include "compat.h" 
    55  
    5654#include <linux/init.h> 
     55 
     56 
     57#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     58#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     59#endif 
     60 
     61#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     62#define THIS_MODULE NULL 
     63#endif 
    5764 
    5865 
  • lm-sensors/trunk/kernel/chips/sis5595.c

    r704 r705  
    3535#include "i2c-isa.h" 
    3636#include "sensors.h" 
    37 #include "compat.h" 
    38  
    3937#include <linux/init.h> 
     38 
     39 
     40#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     41#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     42#endif 
     43 
     44#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     45#define THIS_MODULE NULL 
     46#endif 
    4047 
    4148/* Addresses to scan. 
     
    279286 
    280287  if ( PCIBIOS_SUCCESSFUL != 
    281         pci_read_config_word_united(s_bridge, SIS_bus, SIS_devfn,  
    282                                     SIS5595_BASE_REG, &val)) 
     288        pci_read_config_word(s_bridge, SIS5595_BASE_REG, &val)) 
    283289    return -ENODEV; 
    284290                 
  • lm-sensors/trunk/kernel/chips/thmc50.c

    r704 r705  
    2929#include "i2c-isa.h" 
    3030#include "version.h" 
    31 #include "compat.h" 
    32  
    3331#include <linux/init.h> 
     32 
     33#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     34#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     35#endif 
     36 
     37#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     38#define THIS_MODULE NULL 
     39#endif 
    3440 
    3541/* Addresses to scan */ 
  • lm-sensors/trunk/kernel/chips/w83781d.c

    r704 r705  
    4646#include "i2c-isa.h" 
    4747#include "sensors.h" 
    48 #include "compat.h" 
    49  
    5048#include <linux/init.h> 
     49 
     50#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     51#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     52#endif 
     53 
     54#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     55#define THIS_MODULE NULL 
     56#endif 
    5157 
    5258/* RT Table support #defined so we can take it out if it gets bothersome */ 
  • lm-sensors/trunk/kernel/sensors.c

    r704 r705  
    2727#include <linux/proc_fs.h> 
    2828#include <linux/ioport.h> 
     29#include <asm/uaccess.h> 
    2930 
    3031#include "version.h" 
     
    3233#include "i2c-isa.h" 
    3334#include "sensors.h" 
    34 #include "compat.h" 
    3535 
    3636#include <linux/init.h> 
     
    4141static int sensors_cleanup(void); 
    4242#endif /* MODULE */ 
     43 
     44#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) 
     45#define THIS_MODULE NULL 
     46#endif 
    4347 
    4448static int sensors_create_name(char **name, const char *prefix, 
     
    300304  struct ctl_table *client_tbl; 
    301305 
    302   if (oldval && oldlenp && ! get_user_data(oldlen,oldlenp) && oldlen) { 
     306  if (oldval && oldlenp && ! get_user(oldlen,oldlenp) && oldlen) { 
    303307    maxels = oldlen / sizeof(struct sensors_chips_data); 
    304308    nrels = 0; 
     
    392396 
    393397  /* Check if we need to output the old values */ 
    394   if (oldval && oldlenp && ! get_user_data(oldlen,oldlenp) && oldlen) { 
     398  if (oldval && oldlenp && ! get_user(oldlen,oldlenp) && oldlen) { 
    395399    callback(client,SENSORS_PROC_REAL_READ,table->ctl_name,&nrels,results); 
    396400 
     
    445449 
    446450    /* Skip spaces at the start */ 
    447     while (bufsize && ! get_user_data(nextchar,(char *) buffer) &&  
     451    while (bufsize && ! get_user(nextchar,(char *) buffer) &&  
    448452           isspace((int) nextchar)) { 
    449453      bufsize --; 
     
    461465 
    462466    /* Check for a minus */ 
    463     if (! get_user_data(nextchar,(char *) buffer) && (nextchar == '-')) { 
     467    if (! get_user(nextchar,(char *) buffer) && (nextchar == '-')) { 
    464468      min=1; 
    465469      bufsize--; 
     
    468472 
    469473    /* Digits before a decimal dot */ 
    470     while (bufsize && !get_user_data(nextchar,(char *) buffer) &&  
     474    while (bufsize && !get_user(nextchar,(char *) buffer) &&  
    471475           isdigit((int) nextchar)) { 
    472476      res = res * 10 + nextchar - '0'; 
     
    488492      /* Read digits while they are significant */ 
    489493      while(bufsize && (mag > 0) &&  
    490             !get_user_data(nextchar,(char *) buffer) && 
     494            !get_user(nextchar,(char *) buffer) && 
    491495            isdigit((int) nextchar)) { 
    492496        res = res * 10 + nextchar - '0'; 
     
    503507 
    504508    /* Skip everything until we hit whitespace */ 
    505     while(bufsize && !get_user_data(nextchar,(char *) buffer) && 
     509    while(bufsize && !get_user(nextchar,(char *) buffer) && 
    506510          isspace ((int) nextchar)) { 
    507511      bufsize --;