diff options
Diffstat (limited to 'drivers/i2c/chips/lm90.c')
-rw-r--r-- | drivers/i2c/chips/lm90.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/i2c/chips/lm90.c b/drivers/i2c/chips/lm90.c index 2c00ff83babc..9b127a07f56b 100644 --- a/drivers/i2c/chips/lm90.c +++ b/drivers/i2c/chips/lm90.c | |||
@@ -218,7 +218,7 @@ struct lm90_data { | |||
218 | */ | 218 | */ |
219 | 219 | ||
220 | #define show_temp(value, converter) \ | 220 | #define show_temp(value, converter) \ |
221 | static ssize_t show_##value(struct device *dev, char *buf) \ | 221 | static ssize_t show_##value(struct device *dev, struct device_attribute *attr, char *buf) \ |
222 | { \ | 222 | { \ |
223 | struct lm90_data *data = lm90_update_device(dev); \ | 223 | struct lm90_data *data = lm90_update_device(dev); \ |
224 | return sprintf(buf, "%d\n", converter(data->value)); \ | 224 | return sprintf(buf, "%d\n", converter(data->value)); \ |
@@ -233,7 +233,7 @@ show_temp(temp_crit1, TEMP1_FROM_REG); | |||
233 | show_temp(temp_crit2, TEMP1_FROM_REG); | 233 | show_temp(temp_crit2, TEMP1_FROM_REG); |
234 | 234 | ||
235 | #define set_temp1(value, reg) \ | 235 | #define set_temp1(value, reg) \ |
236 | static ssize_t set_##value(struct device *dev, const char *buf, \ | 236 | static ssize_t set_##value(struct device *dev, struct device_attribute *attr, const char *buf, \ |
237 | size_t count) \ | 237 | size_t count) \ |
238 | { \ | 238 | { \ |
239 | struct i2c_client *client = to_i2c_client(dev); \ | 239 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -250,7 +250,7 @@ static ssize_t set_##value(struct device *dev, const char *buf, \ | |||
250 | return count; \ | 250 | return count; \ |
251 | } | 251 | } |
252 | #define set_temp2(value, regh, regl) \ | 252 | #define set_temp2(value, regh, regl) \ |
253 | static ssize_t set_##value(struct device *dev, const char *buf, \ | 253 | static ssize_t set_##value(struct device *dev, struct device_attribute *attr, const char *buf, \ |
254 | size_t count) \ | 254 | size_t count) \ |
255 | { \ | 255 | { \ |
256 | struct i2c_client *client = to_i2c_client(dev); \ | 256 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -275,7 +275,7 @@ set_temp1(temp_crit1, LM90_REG_W_LOCAL_CRIT); | |||
275 | set_temp1(temp_crit2, LM90_REG_W_REMOTE_CRIT); | 275 | set_temp1(temp_crit2, LM90_REG_W_REMOTE_CRIT); |
276 | 276 | ||
277 | #define show_temp_hyst(value, basereg) \ | 277 | #define show_temp_hyst(value, basereg) \ |
278 | static ssize_t show_##value(struct device *dev, char *buf) \ | 278 | static ssize_t show_##value(struct device *dev, struct device_attribute *attr, char *buf) \ |
279 | { \ | 279 | { \ |
280 | struct lm90_data *data = lm90_update_device(dev); \ | 280 | struct lm90_data *data = lm90_update_device(dev); \ |
281 | return sprintf(buf, "%d\n", TEMP1_FROM_REG(data->basereg) \ | 281 | return sprintf(buf, "%d\n", TEMP1_FROM_REG(data->basereg) \ |
@@ -284,7 +284,7 @@ static ssize_t show_##value(struct device *dev, char *buf) \ | |||
284 | show_temp_hyst(temp_hyst1, temp_crit1); | 284 | show_temp_hyst(temp_hyst1, temp_crit1); |
285 | show_temp_hyst(temp_hyst2, temp_crit2); | 285 | show_temp_hyst(temp_hyst2, temp_crit2); |
286 | 286 | ||
287 | static ssize_t set_temp_hyst1(struct device *dev, const char *buf, | 287 | static ssize_t set_temp_hyst1(struct device *dev, struct device_attribute *attr, const char *buf, |
288 | size_t count) | 288 | size_t count) |
289 | { | 289 | { |
290 | struct i2c_client *client = to_i2c_client(dev); | 290 | struct i2c_client *client = to_i2c_client(dev); |
@@ -300,7 +300,7 @@ static ssize_t set_temp_hyst1(struct device *dev, const char *buf, | |||
300 | return count; | 300 | return count; |
301 | } | 301 | } |
302 | 302 | ||
303 | static ssize_t show_alarms(struct device *dev, char *buf) | 303 | static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf) |
304 | { | 304 | { |
305 | struct lm90_data *data = lm90_update_device(dev); | 305 | struct lm90_data *data = lm90_update_device(dev); |
306 | return sprintf(buf, "%d\n", data->alarms); | 306 | return sprintf(buf, "%d\n", data->alarms); |