diff options
author | Yani Ioannou <yani.ioannou@gmail.com> | 2005-05-17 06:41:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:33 -0400 |
commit | 30f74292e50d6c4ae438dbee5cb45d77bf774351 (patch) | |
tree | 4bfa1b6715ecd597e196a9f448c825ef0c12d8e3 /drivers/i2c/chips/it87.c | |
parent | 74880c063b06efd103c924abfe19d9d8fa4864c4 (diff) |
[PATCH] Driver Core: drivers/i2c/chips/adm1031.c - lm75.c: update device attribute callbacks
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/chips/it87.c')
-rw-r--r-- | drivers/i2c/chips/it87.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c index cf7e6898754f..007bdf9e7e2a 100644 --- a/drivers/i2c/chips/it87.c +++ b/drivers/i2c/chips/it87.c | |||
@@ -290,7 +290,7 @@ static ssize_t set_in_max(struct device *dev, const char *buf, | |||
290 | 290 | ||
291 | #define show_in_offset(offset) \ | 291 | #define show_in_offset(offset) \ |
292 | static ssize_t \ | 292 | static ssize_t \ |
293 | show_in##offset (struct device *dev, char *buf) \ | 293 | show_in##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
294 | { \ | 294 | { \ |
295 | return show_in(dev, buf, offset); \ | 295 | return show_in(dev, buf, offset); \ |
296 | } \ | 296 | } \ |
@@ -298,21 +298,21 @@ static DEVICE_ATTR(in##offset##_input, S_IRUGO, show_in##offset, NULL); | |||
298 | 298 | ||
299 | #define limit_in_offset(offset) \ | 299 | #define limit_in_offset(offset) \ |
300 | static ssize_t \ | 300 | static ssize_t \ |
301 | show_in##offset##_min (struct device *dev, char *buf) \ | 301 | show_in##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \ |
302 | { \ | 302 | { \ |
303 | return show_in_min(dev, buf, offset); \ | 303 | return show_in_min(dev, buf, offset); \ |
304 | } \ | 304 | } \ |
305 | static ssize_t \ | 305 | static ssize_t \ |
306 | show_in##offset##_max (struct device *dev, char *buf) \ | 306 | show_in##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \ |
307 | { \ | 307 | { \ |
308 | return show_in_max(dev, buf, offset); \ | 308 | return show_in_max(dev, buf, offset); \ |
309 | } \ | 309 | } \ |
310 | static ssize_t set_in##offset##_min (struct device *dev, \ | 310 | static ssize_t set_in##offset##_min (struct device *dev, struct device_attribute *attr, \ |
311 | const char *buf, size_t count) \ | 311 | const char *buf, size_t count) \ |
312 | { \ | 312 | { \ |
313 | return set_in_min(dev, buf, count, offset); \ | 313 | return set_in_min(dev, buf, count, offset); \ |
314 | } \ | 314 | } \ |
315 | static ssize_t set_in##offset##_max (struct device *dev, \ | 315 | static ssize_t set_in##offset##_max (struct device *dev, struct device_attribute *attr, \ |
316 | const char *buf, size_t count) \ | 316 | const char *buf, size_t count) \ |
317 | { \ | 317 | { \ |
318 | return set_in_max(dev, buf, count, offset); \ | 318 | return set_in_max(dev, buf, count, offset); \ |
@@ -383,26 +383,26 @@ static ssize_t set_temp_min(struct device *dev, const char *buf, | |||
383 | return count; | 383 | return count; |
384 | } | 384 | } |
385 | #define show_temp_offset(offset) \ | 385 | #define show_temp_offset(offset) \ |
386 | static ssize_t show_temp_##offset (struct device *dev, char *buf) \ | 386 | static ssize_t show_temp_##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
387 | { \ | 387 | { \ |
388 | return show_temp(dev, buf, offset - 1); \ | 388 | return show_temp(dev, buf, offset - 1); \ |
389 | } \ | 389 | } \ |
390 | static ssize_t \ | 390 | static ssize_t \ |
391 | show_temp_##offset##_max (struct device *dev, char *buf) \ | 391 | show_temp_##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \ |
392 | { \ | 392 | { \ |
393 | return show_temp_max(dev, buf, offset - 1); \ | 393 | return show_temp_max(dev, buf, offset - 1); \ |
394 | } \ | 394 | } \ |
395 | static ssize_t \ | 395 | static ssize_t \ |
396 | show_temp_##offset##_min (struct device *dev, char *buf) \ | 396 | show_temp_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \ |
397 | { \ | 397 | { \ |
398 | return show_temp_min(dev, buf, offset - 1); \ | 398 | return show_temp_min(dev, buf, offset - 1); \ |
399 | } \ | 399 | } \ |
400 | static ssize_t set_temp_##offset##_max (struct device *dev, \ | 400 | static ssize_t set_temp_##offset##_max (struct device *dev, struct device_attribute *attr, \ |
401 | const char *buf, size_t count) \ | 401 | const char *buf, size_t count) \ |
402 | { \ | 402 | { \ |
403 | return set_temp_max(dev, buf, count, offset - 1); \ | 403 | return set_temp_max(dev, buf, count, offset - 1); \ |
404 | } \ | 404 | } \ |
405 | static ssize_t set_temp_##offset##_min (struct device *dev, \ | 405 | static ssize_t set_temp_##offset##_min (struct device *dev, struct device_attribute *attr, \ |
406 | const char *buf, size_t count) \ | 406 | const char *buf, size_t count) \ |
407 | { \ | 407 | { \ |
408 | return set_temp_min(dev, buf, count, offset - 1); \ | 408 | return set_temp_min(dev, buf, count, offset - 1); \ |
@@ -453,11 +453,11 @@ static ssize_t set_sensor(struct device *dev, const char *buf, | |||
453 | return count; | 453 | return count; |
454 | } | 454 | } |
455 | #define show_sensor_offset(offset) \ | 455 | #define show_sensor_offset(offset) \ |
456 | static ssize_t show_sensor_##offset (struct device *dev, char *buf) \ | 456 | static ssize_t show_sensor_##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
457 | { \ | 457 | { \ |
458 | return show_sensor(dev, buf, offset - 1); \ | 458 | return show_sensor(dev, buf, offset - 1); \ |
459 | } \ | 459 | } \ |
460 | static ssize_t set_sensor_##offset (struct device *dev, \ | 460 | static ssize_t set_sensor_##offset (struct device *dev, struct device_attribute *attr, \ |
461 | const char *buf, size_t count) \ | 461 | const char *buf, size_t count) \ |
462 | { \ | 462 | { \ |
463 | return set_sensor(dev, buf, count, offset - 1); \ | 463 | return set_sensor(dev, buf, count, offset - 1); \ |
@@ -600,24 +600,24 @@ static ssize_t set_pwm(struct device *dev, const char *buf, | |||
600 | } | 600 | } |
601 | 601 | ||
602 | #define show_fan_offset(offset) \ | 602 | #define show_fan_offset(offset) \ |
603 | static ssize_t show_fan_##offset (struct device *dev, char *buf) \ | 603 | static ssize_t show_fan_##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
604 | { \ | 604 | { \ |
605 | return show_fan(dev, buf, offset - 1); \ | 605 | return show_fan(dev, buf, offset - 1); \ |
606 | } \ | 606 | } \ |
607 | static ssize_t show_fan_##offset##_min (struct device *dev, char *buf) \ | 607 | static ssize_t show_fan_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \ |
608 | { \ | 608 | { \ |
609 | return show_fan_min(dev, buf, offset - 1); \ | 609 | return show_fan_min(dev, buf, offset - 1); \ |
610 | } \ | 610 | } \ |
611 | static ssize_t show_fan_##offset##_div (struct device *dev, char *buf) \ | 611 | static ssize_t show_fan_##offset##_div (struct device *dev, struct device_attribute *attr, char *buf) \ |
612 | { \ | 612 | { \ |
613 | return show_fan_div(dev, buf, offset - 1); \ | 613 | return show_fan_div(dev, buf, offset - 1); \ |
614 | } \ | 614 | } \ |
615 | static ssize_t set_fan_##offset##_min (struct device *dev, \ | 615 | static ssize_t set_fan_##offset##_min (struct device *dev, struct device_attribute *attr, \ |
616 | const char *buf, size_t count) \ | 616 | const char *buf, size_t count) \ |
617 | { \ | 617 | { \ |
618 | return set_fan_min(dev, buf, count, offset - 1); \ | 618 | return set_fan_min(dev, buf, count, offset - 1); \ |
619 | } \ | 619 | } \ |
620 | static ssize_t set_fan_##offset##_div (struct device *dev, \ | 620 | static ssize_t set_fan_##offset##_div (struct device *dev, struct device_attribute *attr, \ |
621 | const char *buf, size_t count) \ | 621 | const char *buf, size_t count) \ |
622 | { \ | 622 | { \ |
623 | return set_fan_div(dev, buf, count, offset - 1); \ | 623 | return set_fan_div(dev, buf, count, offset - 1); \ |
@@ -633,21 +633,21 @@ show_fan_offset(2); | |||
633 | show_fan_offset(3); | 633 | show_fan_offset(3); |
634 | 634 | ||
635 | #define show_pwm_offset(offset) \ | 635 | #define show_pwm_offset(offset) \ |
636 | static ssize_t show_pwm##offset##_enable (struct device *dev, \ | 636 | static ssize_t show_pwm##offset##_enable (struct device *dev, struct device_attribute *attr, \ |
637 | char *buf) \ | 637 | char *buf) \ |
638 | { \ | 638 | { \ |
639 | return show_pwm_enable(dev, buf, offset - 1); \ | 639 | return show_pwm_enable(dev, buf, offset - 1); \ |
640 | } \ | 640 | } \ |
641 | static ssize_t show_pwm##offset (struct device *dev, char *buf) \ | 641 | static ssize_t show_pwm##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
642 | { \ | 642 | { \ |
643 | return show_pwm(dev, buf, offset - 1); \ | 643 | return show_pwm(dev, buf, offset - 1); \ |
644 | } \ | 644 | } \ |
645 | static ssize_t set_pwm##offset##_enable (struct device *dev, \ | 645 | static ssize_t set_pwm##offset##_enable (struct device *dev, struct device_attribute *attr, \ |
646 | const char *buf, size_t count) \ | 646 | const char *buf, size_t count) \ |
647 | { \ | 647 | { \ |
648 | return set_pwm_enable(dev, buf, count, offset - 1); \ | 648 | return set_pwm_enable(dev, buf, count, offset - 1); \ |
649 | } \ | 649 | } \ |
650 | static ssize_t set_pwm##offset (struct device *dev, \ | 650 | static ssize_t set_pwm##offset (struct device *dev, struct device_attribute *attr, \ |
651 | const char *buf, size_t count) \ | 651 | const char *buf, size_t count) \ |
652 | { \ | 652 | { \ |
653 | return set_pwm(dev, buf, count, offset - 1); \ | 653 | return set_pwm(dev, buf, count, offset - 1); \ |
@@ -663,7 +663,7 @@ show_pwm_offset(2); | |||
663 | show_pwm_offset(3); | 663 | show_pwm_offset(3); |
664 | 664 | ||
665 | /* Alarms */ | 665 | /* Alarms */ |
666 | static ssize_t show_alarms(struct device *dev, char *buf) | 666 | static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf) |
667 | { | 667 | { |
668 | struct it87_data *data = it87_update_device(dev); | 668 | struct it87_data *data = it87_update_device(dev); |
669 | return sprintf(buf,"%d\n", ALARMS_FROM_REG(data->alarms)); | 669 | return sprintf(buf,"%d\n", ALARMS_FROM_REG(data->alarms)); |
@@ -671,13 +671,13 @@ static ssize_t show_alarms(struct device *dev, char *buf) | |||
671 | static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); | 671 | static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); |
672 | 672 | ||
673 | static ssize_t | 673 | static ssize_t |
674 | show_vrm_reg(struct device *dev, char *buf) | 674 | show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf) |
675 | { | 675 | { |
676 | struct it87_data *data = it87_update_device(dev); | 676 | struct it87_data *data = it87_update_device(dev); |
677 | return sprintf(buf, "%ld\n", (long) data->vrm); | 677 | return sprintf(buf, "%ld\n", (long) data->vrm); |
678 | } | 678 | } |
679 | static ssize_t | 679 | static ssize_t |
680 | store_vrm_reg(struct device *dev, const char *buf, size_t count) | 680 | store_vrm_reg(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
681 | { | 681 | { |
682 | struct i2c_client *client = to_i2c_client(dev); | 682 | struct i2c_client *client = to_i2c_client(dev); |
683 | struct it87_data *data = i2c_get_clientdata(client); | 683 | struct it87_data *data = i2c_get_clientdata(client); |
@@ -693,7 +693,7 @@ static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg); | |||
693 | device_create_file(&client->dev, &dev_attr_vrm) | 693 | device_create_file(&client->dev, &dev_attr_vrm) |
694 | 694 | ||
695 | static ssize_t | 695 | static ssize_t |
696 | show_vid_reg(struct device *dev, char *buf) | 696 | show_vid_reg(struct device *dev, struct device_attribute *attr, char *buf) |
697 | { | 697 | { |
698 | struct it87_data *data = it87_update_device(dev); | 698 | struct it87_data *data = it87_update_device(dev); |
699 | return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm)); | 699 | return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm)); |