mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-17 10:59:31 +00:00
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