aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/sis5595.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips/sis5595.c')
-rw-r--r--drivers/i2c/chips/sis5595.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/i2c/chips/sis5595.c b/drivers/i2c/chips/sis5595.c
index 7ea84532df32..c6650727a27d 100644
--- a/drivers/i2c/chips/sis5595.c
+++ b/drivers/i2c/chips/sis5595.c
@@ -256,28 +256,28 @@ static ssize_t set_in_max(struct device *dev, const char *buf,
256 256
257#define show_in_offset(offset) \ 257#define show_in_offset(offset) \
258static ssize_t \ 258static ssize_t \
259 show_in##offset (struct device *dev, char *buf) \ 259 show_in##offset (struct device *dev, struct device_attribute *attr, char *buf) \
260{ \ 260{ \
261 return show_in(dev, buf, offset); \ 261 return show_in(dev, buf, offset); \
262} \ 262} \
263static DEVICE_ATTR(in##offset##_input, S_IRUGO, \ 263static DEVICE_ATTR(in##offset##_input, S_IRUGO, \
264 show_in##offset, NULL); \ 264 show_in##offset, NULL); \
265static ssize_t \ 265static ssize_t \
266 show_in##offset##_min (struct device *dev, char *buf) \ 266 show_in##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \
267{ \ 267{ \
268 return show_in_min(dev, buf, offset); \ 268 return show_in_min(dev, buf, offset); \
269} \ 269} \
270static ssize_t \ 270static ssize_t \
271 show_in##offset##_max (struct device *dev, char *buf) \ 271 show_in##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \
272{ \ 272{ \
273 return show_in_max(dev, buf, offset); \ 273 return show_in_max(dev, buf, offset); \
274} \ 274} \
275static ssize_t set_in##offset##_min (struct device *dev, \ 275static ssize_t set_in##offset##_min (struct device *dev, struct device_attribute *attr, \
276 const char *buf, size_t count) \ 276 const char *buf, size_t count) \
277{ \ 277{ \
278 return set_in_min(dev, buf, count, offset); \ 278 return set_in_min(dev, buf, count, offset); \
279} \ 279} \
280static ssize_t set_in##offset##_max (struct device *dev, \ 280static ssize_t set_in##offset##_max (struct device *dev, struct device_attribute *attr, \
281 const char *buf, size_t count) \ 281 const char *buf, size_t count) \
282{ \ 282{ \
283 return set_in_max(dev, buf, count, offset); \ 283 return set_in_max(dev, buf, count, offset); \
@@ -294,19 +294,19 @@ show_in_offset(3);
294show_in_offset(4); 294show_in_offset(4);
295 295
296/* Temperature */ 296/* Temperature */
297static ssize_t show_temp(struct device *dev, char *buf) 297static ssize_t show_temp(struct device *dev, struct device_attribute *attr, char *buf)
298{ 298{
299 struct sis5595_data *data = sis5595_update_device(dev); 299 struct sis5595_data *data = sis5595_update_device(dev);
300 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp)); 300 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp));
301} 301}
302 302
303static ssize_t show_temp_over(struct device *dev, char *buf) 303static ssize_t show_temp_over(struct device *dev, struct device_attribute *attr, char *buf)
304{ 304{
305 struct sis5595_data *data = sis5595_update_device(dev); 305 struct sis5595_data *data = sis5595_update_device(dev);
306 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over)); 306 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over));
307} 307}
308 308
309static ssize_t set_temp_over(struct device *dev, const char *buf, size_t count) 309static ssize_t set_temp_over(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
310{ 310{
311 struct i2c_client *client = to_i2c_client(dev); 311 struct i2c_client *client = to_i2c_client(dev);
312 struct sis5595_data *data = i2c_get_clientdata(client); 312 struct sis5595_data *data = i2c_get_clientdata(client);
@@ -319,13 +319,13 @@ static ssize_t set_temp_over(struct device *dev, const char *buf, size_t count)
319 return count; 319 return count;
320} 320}
321 321
322static ssize_t show_temp_hyst(struct device *dev, char *buf) 322static ssize_t show_temp_hyst(struct device *dev, struct device_attribute *attr, char *buf)
323{ 323{
324 struct sis5595_data *data = sis5595_update_device(dev); 324 struct sis5595_data *data = sis5595_update_device(dev);
325 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_hyst)); 325 return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_hyst));
326} 326}
327 327
328static ssize_t set_temp_hyst(struct device *dev, const char *buf, size_t count) 328static ssize_t set_temp_hyst(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
329{ 329{
330 struct i2c_client *client = to_i2c_client(dev); 330 struct i2c_client *client = to_i2c_client(dev);
331 struct sis5595_data *data = i2c_get_clientdata(client); 331 struct sis5595_data *data = i2c_get_clientdata(client);
@@ -426,19 +426,19 @@ static ssize_t set_fan_div(struct device *dev, const char *buf,
426} 426}
427 427
428#define show_fan_offset(offset) \ 428#define show_fan_offset(offset) \
429static ssize_t show_fan_##offset (struct device *dev, char *buf) \ 429static ssize_t show_fan_##offset (struct device *dev, struct device_attribute *attr, char *buf) \
430{ \ 430{ \
431 return show_fan(dev, buf, offset - 1); \ 431 return show_fan(dev, buf, offset - 1); \
432} \ 432} \
433static ssize_t show_fan_##offset##_min (struct device *dev, char *buf) \ 433static ssize_t show_fan_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \
434{ \ 434{ \
435 return show_fan_min(dev, buf, offset - 1); \ 435 return show_fan_min(dev, buf, offset - 1); \
436} \ 436} \
437static ssize_t show_fan_##offset##_div (struct device *dev, char *buf) \ 437static ssize_t show_fan_##offset##_div (struct device *dev, struct device_attribute *attr, char *buf) \
438{ \ 438{ \
439 return show_fan_div(dev, buf, offset - 1); \ 439 return show_fan_div(dev, buf, offset - 1); \
440} \ 440} \
441static ssize_t set_fan_##offset##_min (struct device *dev, \ 441static ssize_t set_fan_##offset##_min (struct device *dev, struct device_attribute *attr, \
442 const char *buf, size_t count) \ 442 const char *buf, size_t count) \
443{ \ 443{ \
444 return set_fan_min(dev, buf, count, offset - 1); \ 444 return set_fan_min(dev, buf, count, offset - 1); \
@@ -450,13 +450,13 @@ static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \
450show_fan_offset(1); 450show_fan_offset(1);
451show_fan_offset(2); 451show_fan_offset(2);
452 452
453static ssize_t set_fan_1_div(struct device *dev, const char *buf, 453static ssize_t set_fan_1_div(struct device *dev, struct device_attribute *attr, const char *buf,
454 size_t count) 454 size_t count)
455{ 455{
456 return set_fan_div(dev, buf, count, 0) ; 456 return set_fan_div(dev, buf, count, 0) ;
457} 457}
458 458
459static ssize_t set_fan_2_div(struct device *dev, const char *buf, 459static ssize_t set_fan_2_div(struct device *dev, struct device_attribute *attr, const char *buf,
460 size_t count) 460 size_t count)
461{ 461{
462 return set_fan_div(dev, buf, count, 1) ; 462 return set_fan_div(dev, buf, count, 1) ;
@@ -467,7 +467,7 @@ static DEVICE_ATTR(fan2_div, S_IRUGO | S_IWUSR,
467 show_fan_2_div, set_fan_2_div); 467 show_fan_2_div, set_fan_2_div);
468 468
469/* Alarms */ 469/* Alarms */
470static ssize_t show_alarms(struct device *dev, char *buf) 470static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf)
471{ 471{
472 struct sis5595_data *data = sis5595_update_device(dev); 472 struct sis5595_data *data = sis5595_update_device(dev);
473 return sprintf(buf, "%d\n", data->alarms); 473 return sprintf(buf, "%d\n", data->alarms);