X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fhwmon%2Fatxp1.c;fp=drivers%2Fhwmon%2Fatxp1.c;h=b0c490073c8e19c92142e706f976403e2ce50526;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=728a1e8b91904fe570e6767322d6e0a69dc84e2b;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon/atxp1.c index 728a1e8b9..b0c490073 100644 --- a/drivers/hwmon/atxp1.c +++ b/drivers/hwmon/atxp1.c @@ -26,7 +26,6 @@ #include #include #include -#include MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("System voltages control via Attansic ATXP1"); @@ -61,7 +60,7 @@ static struct i2c_driver atxp1_driver = { struct atxp1_data { struct i2c_client client; struct class_device *class_dev; - struct mutex update_lock; + struct semaphore update_lock; unsigned long last_updated; u8 valid; struct { @@ -81,7 +80,7 @@ static struct atxp1_data * atxp1_update_device(struct device *dev) client = to_i2c_client(dev); data = i2c_get_clientdata(client); - mutex_lock(&data->update_lock); + down(&data->update_lock); if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { @@ -94,7 +93,7 @@ static struct atxp1_data * atxp1_update_device(struct device *dev) data->valid = 1; } - mutex_unlock(&data->update_lock); + up(&data->update_lock); return(data); } @@ -310,7 +309,7 @@ static int atxp1_detect(struct i2c_adapter *adapter, int address, int kind) data->valid = 0; - mutex_init(&data->update_lock); + init_MUTEX(&data->update_lock); err = i2c_attach_client(new_client);