Files
lm-sensors/kernel/chips
Philip Edelbrock 67ee5f476a (Phil) Fixed mutex initialization problem in w83781d_detect:
Originally:

[...]
  if (is_isa) {
    data = (struct w83781d_data *) (((struct isa_client *) new_client)+1);
    new_client->addr = 0;
    ((struct isa_client *) new_client)->isa_addr = address;
    data->lock = MUTEX;
  } else {
    data = (struct w83781d_data *) (((struct i2c_client *) new_client)+1);
    new_client->addr = address;
  }
[...]

changed to this:

[...]
  if (is_isa) {
    data = (struct w83781d_data *) (((struct isa_client *) new_client)+1);
    new_client->addr = 0;
    ((struct isa_client *) new_client)->isa_addr = address;
  } else {
    data = (struct w83781d_data *) (((struct i2c_client *) new_client)+1);
    new_client->addr = address;
  }
  data->lock = MUTEX;
[...]

So, now the MUTEX is properly initialized for I2C chips, too.  If the
mutex was knowly ignored for I2C devices (because the piix4 locks its
self), then the mutex should be ignored everywhere else in the code, but
it is not.

This seems to have solved my reproducable 'hanging' problem.  But, other
drivers should be checked, too, just in case.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@433 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-04-30 07:09:37 +00:00
..
1999-04-15 22:19:59 +00:00