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/adm1031.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/adm1031.c')
-rw-r--r-- | drivers/i2c/chips/adm1031.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/i2c/chips/adm1031.c b/drivers/i2c/chips/adm1031.c index d4385a23f79a..2163dba467c4 100644 --- a/drivers/i2c/chips/adm1031.c +++ b/drivers/i2c/chips/adm1031.c | |||
@@ -292,11 +292,11 @@ set_fan_auto_channel(struct device *dev, const char *buf, size_t count, int nr) | |||
292 | } | 292 | } |
293 | 293 | ||
294 | #define fan_auto_channel_offset(offset) \ | 294 | #define fan_auto_channel_offset(offset) \ |
295 | static ssize_t show_fan_auto_channel_##offset (struct device *dev, char *buf) \ | 295 | static ssize_t show_fan_auto_channel_##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
296 | { \ | 296 | { \ |
297 | return show_fan_auto_channel(dev, buf, offset - 1); \ | 297 | return show_fan_auto_channel(dev, buf, offset - 1); \ |
298 | } \ | 298 | } \ |
299 | static ssize_t set_fan_auto_channel_##offset (struct device *dev, \ | 299 | static ssize_t set_fan_auto_channel_##offset (struct device *dev, struct device_attribute *attr, \ |
300 | const char *buf, size_t count) \ | 300 | const char *buf, size_t count) \ |
301 | { \ | 301 | { \ |
302 | return set_fan_auto_channel(dev, buf, count, offset - 1); \ | 302 | return set_fan_auto_channel(dev, buf, count, offset - 1); \ |
@@ -357,24 +357,24 @@ set_auto_temp_max(struct device *dev, const char *buf, size_t count, int nr) | |||
357 | } | 357 | } |
358 | 358 | ||
359 | #define auto_temp_reg(offset) \ | 359 | #define auto_temp_reg(offset) \ |
360 | static ssize_t show_auto_temp_##offset##_off (struct device *dev, char *buf) \ | 360 | static ssize_t show_auto_temp_##offset##_off (struct device *dev, struct device_attribute *attr, char *buf) \ |
361 | { \ | 361 | { \ |
362 | return show_auto_temp_off(dev, buf, offset - 1); \ | 362 | return show_auto_temp_off(dev, buf, offset - 1); \ |
363 | } \ | 363 | } \ |
364 | static ssize_t show_auto_temp_##offset##_min (struct device *dev, char *buf) \ | 364 | static ssize_t show_auto_temp_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \ |
365 | { \ | 365 | { \ |
366 | return show_auto_temp_min(dev, buf, offset - 1); \ | 366 | return show_auto_temp_min(dev, buf, offset - 1); \ |
367 | } \ | 367 | } \ |
368 | static ssize_t show_auto_temp_##offset##_max (struct device *dev, char *buf) \ | 368 | static ssize_t show_auto_temp_##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \ |
369 | { \ | 369 | { \ |
370 | return show_auto_temp_max(dev, buf, offset - 1); \ | 370 | return show_auto_temp_max(dev, buf, offset - 1); \ |
371 | } \ | 371 | } \ |
372 | static ssize_t set_auto_temp_##offset##_min (struct device *dev, \ | 372 | static ssize_t set_auto_temp_##offset##_min (struct device *dev, struct device_attribute *attr, \ |
373 | const char *buf, size_t count) \ | 373 | const char *buf, size_t count) \ |
374 | { \ | 374 | { \ |
375 | return set_auto_temp_min(dev, buf, count, offset - 1); \ | 375 | return set_auto_temp_min(dev, buf, count, offset - 1); \ |
376 | } \ | 376 | } \ |
377 | static ssize_t set_auto_temp_##offset##_max (struct device *dev, \ | 377 | static ssize_t set_auto_temp_##offset##_max (struct device *dev, struct device_attribute *attr, \ |
378 | const char *buf, size_t count) \ | 378 | const char *buf, size_t count) \ |
379 | { \ | 379 | { \ |
380 | return set_auto_temp_max(dev, buf, count, offset - 1); \ | 380 | return set_auto_temp_max(dev, buf, count, offset - 1); \ |
@@ -421,11 +421,11 @@ set_pwm(struct device *dev, const char *buf, size_t count, int nr) | |||
421 | } | 421 | } |
422 | 422 | ||
423 | #define pwm_reg(offset) \ | 423 | #define pwm_reg(offset) \ |
424 | static ssize_t show_pwm_##offset (struct device *dev, char *buf) \ | 424 | static ssize_t show_pwm_##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
425 | { \ | 425 | { \ |
426 | return show_pwm(dev, buf, offset - 1); \ | 426 | return show_pwm(dev, buf, offset - 1); \ |
427 | } \ | 427 | } \ |
428 | static ssize_t set_pwm_##offset (struct device *dev, \ | 428 | static ssize_t set_pwm_##offset (struct device *dev, struct device_attribute *attr, \ |
429 | const char *buf, size_t count) \ | 429 | const char *buf, size_t count) \ |
430 | { \ | 430 | { \ |
431 | return set_pwm(dev, buf, count, offset - 1); \ | 431 | return set_pwm(dev, buf, count, offset - 1); \ |
@@ -557,24 +557,24 @@ set_fan_div(struct device *dev, const char *buf, size_t count, int nr) | |||
557 | } | 557 | } |
558 | 558 | ||
559 | #define fan_offset(offset) \ | 559 | #define fan_offset(offset) \ |
560 | static ssize_t show_fan_##offset (struct device *dev, char *buf) \ | 560 | static ssize_t show_fan_##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
561 | { \ | 561 | { \ |
562 | return show_fan(dev, buf, offset - 1); \ | 562 | return show_fan(dev, buf, offset - 1); \ |
563 | } \ | 563 | } \ |
564 | static ssize_t show_fan_##offset##_min (struct device *dev, char *buf) \ | 564 | static ssize_t show_fan_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \ |
565 | { \ | 565 | { \ |
566 | return show_fan_min(dev, buf, offset - 1); \ | 566 | return show_fan_min(dev, buf, offset - 1); \ |
567 | } \ | 567 | } \ |
568 | static ssize_t show_fan_##offset##_div (struct device *dev, char *buf) \ | 568 | static ssize_t show_fan_##offset##_div (struct device *dev, struct device_attribute *attr, char *buf) \ |
569 | { \ | 569 | { \ |
570 | return show_fan_div(dev, buf, offset - 1); \ | 570 | return show_fan_div(dev, buf, offset - 1); \ |
571 | } \ | 571 | } \ |
572 | static ssize_t set_fan_##offset##_min (struct device *dev, \ | 572 | static ssize_t set_fan_##offset##_min (struct device *dev, struct device_attribute *attr, \ |
573 | const char *buf, size_t count) \ | 573 | const char *buf, size_t count) \ |
574 | { \ | 574 | { \ |
575 | return set_fan_min(dev, buf, count, offset - 1); \ | 575 | return set_fan_min(dev, buf, count, offset - 1); \ |
576 | } \ | 576 | } \ |
577 | static ssize_t set_fan_##offset##_div (struct device *dev, \ | 577 | static ssize_t set_fan_##offset##_div (struct device *dev, struct device_attribute *attr, \ |
578 | const char *buf, size_t count) \ | 578 | const char *buf, size_t count) \ |
579 | { \ | 579 | { \ |
580 | return set_fan_div(dev, buf, count, offset - 1); \ | 580 | return set_fan_div(dev, buf, count, offset - 1); \ |
@@ -667,33 +667,33 @@ set_temp_crit(struct device *dev, const char *buf, size_t count, int nr) | |||
667 | } | 667 | } |
668 | 668 | ||
669 | #define temp_reg(offset) \ | 669 | #define temp_reg(offset) \ |
670 | static ssize_t show_temp_##offset (struct device *dev, char *buf) \ | 670 | static ssize_t show_temp_##offset (struct device *dev, struct device_attribute *attr, char *buf) \ |
671 | { \ | 671 | { \ |
672 | return show_temp(dev, buf, offset - 1); \ | 672 | return show_temp(dev, buf, offset - 1); \ |
673 | } \ | 673 | } \ |
674 | static ssize_t show_temp_##offset##_min (struct device *dev, char *buf) \ | 674 | static ssize_t show_temp_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \ |
675 | { \ | 675 | { \ |
676 | return show_temp_min(dev, buf, offset - 1); \ | 676 | return show_temp_min(dev, buf, offset - 1); \ |
677 | } \ | 677 | } \ |
678 | static ssize_t show_temp_##offset##_max (struct device *dev, char *buf) \ | 678 | static ssize_t show_temp_##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \ |
679 | { \ | 679 | { \ |
680 | return show_temp_max(dev, buf, offset - 1); \ | 680 | return show_temp_max(dev, buf, offset - 1); \ |
681 | } \ | 681 | } \ |
682 | static ssize_t show_temp_##offset##_crit (struct device *dev, char *buf) \ | 682 | static ssize_t show_temp_##offset##_crit (struct device *dev, struct device_attribute *attr, char *buf) \ |
683 | { \ | 683 | { \ |
684 | return show_temp_crit(dev, buf, offset - 1); \ | 684 | return show_temp_crit(dev, buf, offset - 1); \ |
685 | } \ | 685 | } \ |
686 | static ssize_t set_temp_##offset##_min (struct device *dev, \ | 686 | static ssize_t set_temp_##offset##_min (struct device *dev, struct device_attribute *attr, \ |
687 | const char *buf, size_t count) \ | 687 | const char *buf, size_t count) \ |
688 | { \ | 688 | { \ |
689 | return set_temp_min(dev, buf, count, offset - 1); \ | 689 | return set_temp_min(dev, buf, count, offset - 1); \ |
690 | } \ | 690 | } \ |
691 | static ssize_t set_temp_##offset##_max (struct device *dev, \ | 691 | static ssize_t set_temp_##offset##_max (struct device *dev, struct device_attribute *attr, \ |
692 | const char *buf, size_t count) \ | 692 | const char *buf, size_t count) \ |
693 | { \ | 693 | { \ |
694 | return set_temp_max(dev, buf, count, offset - 1); \ | 694 | return set_temp_max(dev, buf, count, offset - 1); \ |
695 | } \ | 695 | } \ |
696 | static ssize_t set_temp_##offset##_crit (struct device *dev, \ | 696 | static ssize_t set_temp_##offset##_crit (struct device *dev, struct device_attribute *attr, \ |
697 | const char *buf, size_t count) \ | 697 | const char *buf, size_t count) \ |
698 | { \ | 698 | { \ |
699 | return set_temp_crit(dev, buf, count, offset - 1); \ | 699 | return set_temp_crit(dev, buf, count, offset - 1); \ |
@@ -712,7 +712,7 @@ temp_reg(2); | |||
712 | temp_reg(3); | 712 | temp_reg(3); |
713 | 713 | ||
714 | /* Alarms */ | 714 | /* Alarms */ |
715 | static ssize_t show_alarms(struct device *dev, char *buf) | 715 | static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf) |
716 | { | 716 | { |
717 | struct adm1031_data *data = adm1031_update_device(dev); | 717 | struct adm1031_data *data = adm1031_update_device(dev); |
718 | return sprintf(buf, "%d\n", data->alarm); | 718 | return sprintf(buf, "%d\n", data->alarm); |