Changeset 467

Show
Ignore:
Timestamp:
06/02/99 20:19:38 (10 years ago)
Author:
frodo
Message:

Bradley M. Keryan's patches to make lm_sensors compile against
2.3.x kernels (x >= 1).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/TODO

    r466 r467  
    44============== 
    55 
     6* linux/Documentation/devices.txt lists i2c0, i2c1 etc. instead of i2c-0, i2c-1 
     7* LM78 detection: Tom Webster has proven that the reset bit in the  
     8  id register can be one (strange!) 
    69* Check for kernel 2.0.8 warnings 
    710* Increase use count of adapter driver if directory of chip is entered 
  • lm-sensors/trunk/i2c/MODIFICATIONS

    r430 r467  
    1717 
    1818! Fixed i2c_probe bug 
     19 
     20! Changed to init_MUTEX and a compatibility line in i2c-core.c 
    1921 
    2022* Algo-bit now scans the bus before registering the adapter. 
  • lm-sensors/trunk/i2c/i2c-core.c

    r346 r467  
    2727 
    2828#include "i2c.h" 
     29 
     30#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     31#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     32#endif 
    2933  
    3034/* ----- global defines ---------------------------------------------------- */ 
     
    139143        adap->lock = (spinlock_t)SPIN_LOCK_UNLOCKED; 
    140144#else 
    141         adap->lock = MUTEX
     145        init_MUTEX(&adap->lock)
    142146#endif 
    143147 
  • lm-sensors/trunk/kernel/chips/adm1021.c

    r395 r467  
    2727#include "i2c-isa.h" 
    2828#include "version.h" 
     29#include "compat.h" 
    2930 
    3031/* Addresses to scan */ 
     
    270271  new_client->id = i; 
    271272  data->valid = 0; 
    272   data->update_lock = MUTEX
     273  init_MUTEX(&data->update_lock)
    273274 
    274275  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/chips/adm9240.c

    r401 r467  
    420420  new_client->id = i; 
    421421  data->valid = 0; 
    422   data->update_lock = MUTEX
     422  init_MUTEX(&data->update_lock)
    423423 
    424424  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/chips/bt869.c

    r463 r467  
    2929#include "i2c-isa.h" 
    3030#include "version.h" 
     31#include "compat.h" 
    3132 
    3233/* Addresses to scan */ 
     
    228229  new_client->id = i; 
    229230  data->valid = 0; 
    230   data->update_lock = MUTEX
     231  init_MUTEX(&data->update_lock)
    231232     
    232233  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/chips/eeprom.c

    r371 r467  
    2727#include "i2c-isa.h" 
    2828#include "version.h" 
     29#include "compat.h" 
    2930 
    3031/* Addresses to scan */ 
     
    225226  new_client->id = i; 
    226227  data->valid = 0; 
    227   data->update_lock = MUTEX
     228  init_MUTEX(&data->update_lock)
    228229 
    229230  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/chips/gl518sm.c

    r403 r467  
    349349  new_client->id = i; 
    350350  data->valid = 0; 
    351   data->update_lock = MUTEX
     351  init_MUTEX(&data->update_lock)
    352352 
    353353  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/chips/icspll.c

    r344 r467  
    177177    strcpy(new_client->name,"ICSPLL chip"); 
    178178    data->valid = 0; 
    179     data->update_lock = MUTEX
     179    init_MUTEX(&data->update_lock)
    180180/* fill data structure so unknown registers are 0xFF */ 
    181181    data->data[0] = ICSPLL_SIZE; 
  • lm-sensors/trunk/kernel/chips/lm75.c

    r445 r467  
    2626#include "i2c-isa.h" 
    2727#include "version.h" 
     28#include "compat.h" 
    2829 
    2930/* Addresses to scan */ 
     
    205206  new_client->id = i; 
    206207  data->valid = 0; 
    207   data->update_lock = MUTEX
     208  init_MUTEX(&data->update_lock)
    208209     
    209210  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/chips/lm78.c

    r381 r467  
    358358    new_client->addr = 0; 
    359359    ((struct isa_client *) new_client)->isa_addr = address; 
    360     data->lock = MUTEX
     360    init_MUTEX(&data->lock)
    361361  } else { 
    362362    data = (struct lm78_data *) (((struct i2c_client *) new_client) + 1); 
     
    429429  new_client->id = i; 
    430430  data->valid = 0; 
    431   data->update_lock = MUTEX
     431  init_MUTEX(&data->update_lock)
    432432 
    433433  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/chips/lm80.c

    r382 r467  
    358358  new_client->id = i; 
    359359  data->valid = 0; 
    360   data->update_lock = MUTEX
     360  init_MUTEX(&data->update_lock)
    361361 
    362362  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/chips/ltc1710.c

    r372 r467  
    4949#include "i2c-isa.h" 
    5050#include "version.h" 
     51#include "compat.h" 
    5152 
    5253/* Addresses to scan */ 
     
    207208  new_client->id = i; 
    208209  data->valid = 0; 
    209   data->update_lock = MUTEX
     210  init_MUTEX(&data->update_lock)
    210211 
    211212  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/chips/maxilife.c

    r382 r467  
    416416   data = new_client->data; 
    417417   data->valid = 0; 
    418    data->lock = MUTEX
    419    data->update_lock = MUTEX
     418   init_MUTEX(&data->lock)
     419   init_MUTEX(&data->update_lock)
    420420   return 0; 
    421421} 
  • lm-sensors/trunk/kernel/chips/sis5595.c

    r382 r467  
    359359  new_client->addr = 0; 
    360360  ((struct isa_client *) new_client)->isa_addr = address; 
    361   data->lock = MUTEX
     361  init_MUTEX(&data->lock)
    362362  new_client->data = data; 
    363363  new_client->adapter = adapter; 
     
    403403  new_client->id = i; 
    404404  data->valid = 0; 
    405   data->update_lock = MUTEX
     405  init_MUTEX(&data->update_lock)
    406406 
    407407  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/chips/w83781d.c

    r466 r467  
    694694    new_client->addr = address; 
    695695  } 
    696   data->lock = MUTEX
     696  init_MUTEX(&data->lock)
    697697  new_client->data = data; 
    698698  new_client->adapter = adapter; 
     
    778778  new_client->id = i; 
    779779  data->valid = 0; 
    780   data->update_lock = MUTEX
     780  init_MUTEX(&data->update_lock)
    781781 
    782782  /* Tell the I2C layer a new client has arrived */ 
  • lm-sensors/trunk/kernel/include/compat.h

    r442 r467  
    9090#endif 
    9191 
     92#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)) 
     93#define init_MUTEX(s) do { *(s) = MUTEX; } while(0) 
     94#endif 
     95 
    9296#endif /* SENSORS_COMPAT_H */