X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fi2c%2Fchips%2Fw83l785ts.c;h=58575861fc78cdacc172de8f7b4b75865dd078c1;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=0062d86f1f6e25fbb4aac80ce2f869b2597e9ced;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/i2c/chips/w83l785ts.c b/drivers/i2c/chips/w83l785ts.c index 0062d86f1..58575861f 100644 --- a/drivers/i2c/chips/w83l785ts.c +++ b/drivers/i2c/chips/w83l785ts.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -136,8 +137,8 @@ static ssize_t show_temp_over(struct device *dev, char *buf) return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over)); } -static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL) -static DEVICE_ATTR(temp1_max, S_IRUGO, show_temp_over, NULL) +static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); +static DEVICE_ATTR(temp1_max, S_IRUGO, show_temp_over, NULL); /* * Real code @@ -145,7 +146,7 @@ static DEVICE_ATTR(temp1_max, S_IRUGO, show_temp_over, NULL) static int w83l785ts_attach_adapter(struct i2c_adapter *adapter) { - if (!(adapter->class & I2C_ADAP_CLASS_SMBUS)) + if (!(adapter->class & I2C_CLASS_HWMON)) return 0; return i2c_detect(adapter, &addr_data, w83l785ts_detect); } @@ -284,7 +285,7 @@ static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval) if (value >= 0) return value; dev_dbg(&client->dev, "Read failed, will retry in %d.\n", i); - i2c_delay(i); + msleep(i); } dev_err(&client->dev, "Couldn't read value from register. "