diff options
Diffstat (limited to 'drivers/i2c/chips/lm80.c')
-rw-r--r-- | drivers/i2c/chips/lm80.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/i2c/chips/lm80.c b/drivers/i2c/chips/lm80.c index a72f431971bb..404057b70e90 100644 --- a/drivers/i2c/chips/lm80.c +++ b/drivers/i2c/chips/lm80.c | |||
@@ -156,7 +156,7 @@ static struct i2c_driver lm80_driver = { | |||
156 | */ | 156 | */ |
157 | 157 | ||
158 | #define show_in(suffix, value) \ | 158 | #define show_in(suffix, value) \ |
159 | static ssize_t show_in_##suffix(struct device *dev, char *buf) \ | 159 | static ssize_t show_in_##suffix(struct device *dev, struct device_attribute *attr, char *buf) \ |
160 | { \ | 160 | { \ |
161 | struct lm80_data *data = lm80_update_device(dev); \ | 161 | struct lm80_data *data = lm80_update_device(dev); \ |
162 | return sprintf(buf, "%d\n", IN_FROM_REG(data->value)); \ | 162 | return sprintf(buf, "%d\n", IN_FROM_REG(data->value)); \ |
@@ -184,7 +184,7 @@ show_in(input5, in[5]); | |||
184 | show_in(input6, in[6]); | 184 | show_in(input6, in[6]); |
185 | 185 | ||
186 | #define set_in(suffix, value, reg) \ | 186 | #define set_in(suffix, value, reg) \ |
187 | static ssize_t set_in_##suffix(struct device *dev, const char *buf, \ | 187 | static ssize_t set_in_##suffix(struct device *dev, struct device_attribute *attr, const char *buf, \ |
188 | size_t count) \ | 188 | size_t count) \ |
189 | { \ | 189 | { \ |
190 | struct i2c_client *client = to_i2c_client(dev); \ | 190 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -213,7 +213,7 @@ set_in(max5, in_max[5], LM80_REG_IN_MAX(5)); | |||
213 | set_in(max6, in_max[6], LM80_REG_IN_MAX(6)); | 213 | set_in(max6, in_max[6], LM80_REG_IN_MAX(6)); |
214 | 214 | ||
215 | #define show_fan(suffix, value, div) \ | 215 | #define show_fan(suffix, value, div) \ |
216 | static ssize_t show_fan_##suffix(struct device *dev, char *buf) \ | 216 | static ssize_t show_fan_##suffix(struct device *dev, struct device_attribute *attr, char *buf) \ |
217 | { \ | 217 | { \ |
218 | struct lm80_data *data = lm80_update_device(dev); \ | 218 | struct lm80_data *data = lm80_update_device(dev); \ |
219 | return sprintf(buf, "%d\n", FAN_FROM_REG(data->value, \ | 219 | return sprintf(buf, "%d\n", FAN_FROM_REG(data->value, \ |
@@ -225,7 +225,7 @@ show_fan(input1, fan[0], fan_div[0]); | |||
225 | show_fan(input2, fan[1], fan_div[1]); | 225 | show_fan(input2, fan[1], fan_div[1]); |
226 | 226 | ||
227 | #define show_fan_div(suffix, value) \ | 227 | #define show_fan_div(suffix, value) \ |
228 | static ssize_t show_fan_div##suffix(struct device *dev, char *buf) \ | 228 | static ssize_t show_fan_div##suffix(struct device *dev, struct device_attribute *attr, char *buf) \ |
229 | { \ | 229 | { \ |
230 | struct lm80_data *data = lm80_update_device(dev); \ | 230 | struct lm80_data *data = lm80_update_device(dev); \ |
231 | return sprintf(buf, "%d\n", DIV_FROM_REG(data->value)); \ | 231 | return sprintf(buf, "%d\n", DIV_FROM_REG(data->value)); \ |
@@ -234,7 +234,7 @@ show_fan_div(1, fan_div[0]); | |||
234 | show_fan_div(2, fan_div[1]); | 234 | show_fan_div(2, fan_div[1]); |
235 | 235 | ||
236 | #define set_fan(suffix, value, reg, div) \ | 236 | #define set_fan(suffix, value, reg, div) \ |
237 | static ssize_t set_fan_##suffix(struct device *dev, const char *buf, \ | 237 | static ssize_t set_fan_##suffix(struct device *dev, struct device_attribute *attr, const char *buf, \ |
238 | size_t count) \ | 238 | size_t count) \ |
239 | { \ | 239 | { \ |
240 | struct i2c_client *client = to_i2c_client(dev); \ | 240 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -292,7 +292,7 @@ static ssize_t set_fan_div(struct device *dev, const char *buf, | |||
292 | } | 292 | } |
293 | 293 | ||
294 | #define set_fan_div(number) \ | 294 | #define set_fan_div(number) \ |
295 | static ssize_t set_fan_div##number(struct device *dev, const char *buf, \ | 295 | static ssize_t set_fan_div##number(struct device *dev, struct device_attribute *attr, const char *buf, \ |
296 | size_t count) \ | 296 | size_t count) \ |
297 | { \ | 297 | { \ |
298 | return set_fan_div(dev, buf, count, number - 1); \ | 298 | return set_fan_div(dev, buf, count, number - 1); \ |
@@ -300,14 +300,14 @@ static ssize_t set_fan_div##number(struct device *dev, const char *buf, \ | |||
300 | set_fan_div(1); | 300 | set_fan_div(1); |
301 | set_fan_div(2); | 301 | set_fan_div(2); |
302 | 302 | ||
303 | static ssize_t show_temp_input1(struct device *dev, char *buf) | 303 | static ssize_t show_temp_input1(struct device *dev, struct device_attribute *attr, char *buf) |
304 | { | 304 | { |
305 | struct lm80_data *data = lm80_update_device(dev); | 305 | struct lm80_data *data = lm80_update_device(dev); |
306 | return sprintf(buf, "%ld\n", TEMP_FROM_REG(data->temp)); | 306 | return sprintf(buf, "%ld\n", TEMP_FROM_REG(data->temp)); |
307 | } | 307 | } |
308 | 308 | ||
309 | #define show_temp(suffix, value) \ | 309 | #define show_temp(suffix, value) \ |
310 | static ssize_t show_temp_##suffix(struct device *dev, char *buf) \ | 310 | static ssize_t show_temp_##suffix(struct device *dev, struct device_attribute *attr, char *buf) \ |
311 | { \ | 311 | { \ |
312 | struct lm80_data *data = lm80_update_device(dev); \ | 312 | struct lm80_data *data = lm80_update_device(dev); \ |
313 | return sprintf(buf, "%d\n", TEMP_LIMIT_FROM_REG(data->value)); \ | 313 | return sprintf(buf, "%d\n", TEMP_LIMIT_FROM_REG(data->value)); \ |
@@ -318,7 +318,7 @@ show_temp(os_max, temp_os_max); | |||
318 | show_temp(os_hyst, temp_os_hyst); | 318 | show_temp(os_hyst, temp_os_hyst); |
319 | 319 | ||
320 | #define set_temp(suffix, value, reg) \ | 320 | #define set_temp(suffix, value, reg) \ |
321 | static ssize_t set_temp_##suffix(struct device *dev, const char *buf, \ | 321 | static ssize_t set_temp_##suffix(struct device *dev, struct device_attribute *attr, const char *buf, \ |
322 | size_t count) \ | 322 | size_t count) \ |
323 | { \ | 323 | { \ |
324 | struct i2c_client *client = to_i2c_client(dev); \ | 324 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -336,7 +336,7 @@ set_temp(hot_hyst, temp_hot_hyst, LM80_REG_TEMP_HOT_HYST); | |||
336 | set_temp(os_max, temp_os_max, LM80_REG_TEMP_OS_MAX); | 336 | set_temp(os_max, temp_os_max, LM80_REG_TEMP_OS_MAX); |
337 | set_temp(os_hyst, temp_os_hyst, LM80_REG_TEMP_OS_HYST); | 337 | set_temp(os_hyst, temp_os_hyst, LM80_REG_TEMP_OS_HYST); |
338 | 338 | ||
339 | static ssize_t show_alarms(struct device *dev, char *buf) | 339 | static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf) |
340 | { | 340 | { |
341 | struct lm80_data *data = lm80_update_device(dev); | 341 | struct lm80_data *data = lm80_update_device(dev); |
342 | return sprintf(buf, "%u\n", data->alarms); | 342 | return sprintf(buf, "%u\n", data->alarms); |