diff options
Diffstat (limited to 'drivers/hwmon/aspeed-pwm-tacho.c')
-rw-r--r-- | drivers/hwmon/aspeed-pwm-tacho.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/hwmon/aspeed-pwm-tacho.c b/drivers/hwmon/aspeed-pwm-tacho.c index cc15bedb3415..9de13d626c68 100644 --- a/drivers/hwmon/aspeed-pwm-tacho.c +++ b/drivers/hwmon/aspeed-pwm-tacho.c | |||
@@ -597,24 +597,23 @@ static umode_t fan_dev_is_visible(struct kobject *kobj, | |||
597 | return a->mode; | 597 | return a->mode; |
598 | } | 598 | } |
599 | 599 | ||
600 | static SENSOR_DEVICE_ATTR(pwm0, 0644, | ||
601 | show_pwm, set_pwm, 0); | ||
602 | static SENSOR_DEVICE_ATTR(pwm1, 0644, | 600 | static SENSOR_DEVICE_ATTR(pwm1, 0644, |
603 | show_pwm, set_pwm, 1); | 601 | show_pwm, set_pwm, 0); |
604 | static SENSOR_DEVICE_ATTR(pwm2, 0644, | 602 | static SENSOR_DEVICE_ATTR(pwm2, 0644, |
605 | show_pwm, set_pwm, 2); | 603 | show_pwm, set_pwm, 1); |
606 | static SENSOR_DEVICE_ATTR(pwm3, 0644, | 604 | static SENSOR_DEVICE_ATTR(pwm3, 0644, |
607 | show_pwm, set_pwm, 3); | 605 | show_pwm, set_pwm, 2); |
608 | static SENSOR_DEVICE_ATTR(pwm4, 0644, | 606 | static SENSOR_DEVICE_ATTR(pwm4, 0644, |
609 | show_pwm, set_pwm, 4); | 607 | show_pwm, set_pwm, 3); |
610 | static SENSOR_DEVICE_ATTR(pwm5, 0644, | 608 | static SENSOR_DEVICE_ATTR(pwm5, 0644, |
611 | show_pwm, set_pwm, 5); | 609 | show_pwm, set_pwm, 4); |
612 | static SENSOR_DEVICE_ATTR(pwm6, 0644, | 610 | static SENSOR_DEVICE_ATTR(pwm6, 0644, |
613 | show_pwm, set_pwm, 6); | 611 | show_pwm, set_pwm, 5); |
614 | static SENSOR_DEVICE_ATTR(pwm7, 0644, | 612 | static SENSOR_DEVICE_ATTR(pwm7, 0644, |
613 | show_pwm, set_pwm, 6); | ||
614 | static SENSOR_DEVICE_ATTR(pwm8, 0644, | ||
615 | show_pwm, set_pwm, 7); | 615 | show_pwm, set_pwm, 7); |
616 | static struct attribute *pwm_dev_attrs[] = { | 616 | static struct attribute *pwm_dev_attrs[] = { |
617 | &sensor_dev_attr_pwm0.dev_attr.attr, | ||
618 | &sensor_dev_attr_pwm1.dev_attr.attr, | 617 | &sensor_dev_attr_pwm1.dev_attr.attr, |
619 | &sensor_dev_attr_pwm2.dev_attr.attr, | 618 | &sensor_dev_attr_pwm2.dev_attr.attr, |
620 | &sensor_dev_attr_pwm3.dev_attr.attr, | 619 | &sensor_dev_attr_pwm3.dev_attr.attr, |
@@ -622,6 +621,7 @@ static struct attribute *pwm_dev_attrs[] = { | |||
622 | &sensor_dev_attr_pwm5.dev_attr.attr, | 621 | &sensor_dev_attr_pwm5.dev_attr.attr, |
623 | &sensor_dev_attr_pwm6.dev_attr.attr, | 622 | &sensor_dev_attr_pwm6.dev_attr.attr, |
624 | &sensor_dev_attr_pwm7.dev_attr.attr, | 623 | &sensor_dev_attr_pwm7.dev_attr.attr, |
624 | &sensor_dev_attr_pwm8.dev_attr.attr, | ||
625 | NULL, | 625 | NULL, |
626 | }; | 626 | }; |
627 | 627 | ||
@@ -630,40 +630,39 @@ static const struct attribute_group pwm_dev_group = { | |||
630 | .is_visible = pwm_is_visible, | 630 | .is_visible = pwm_is_visible, |
631 | }; | 631 | }; |
632 | 632 | ||
633 | static SENSOR_DEVICE_ATTR(fan0_input, 0444, | ||
634 | show_rpm, NULL, 0); | ||
635 | static SENSOR_DEVICE_ATTR(fan1_input, 0444, | 633 | static SENSOR_DEVICE_ATTR(fan1_input, 0444, |
636 | show_rpm, NULL, 1); | 634 | show_rpm, NULL, 0); |
637 | static SENSOR_DEVICE_ATTR(fan2_input, 0444, | 635 | static SENSOR_DEVICE_ATTR(fan2_input, 0444, |
638 | show_rpm, NULL, 2); | 636 | show_rpm, NULL, 1); |
639 | static SENSOR_DEVICE_ATTR(fan3_input, 0444, | 637 | static SENSOR_DEVICE_ATTR(fan3_input, 0444, |
640 | show_rpm, NULL, 3); | 638 | show_rpm, NULL, 2); |
641 | static SENSOR_DEVICE_ATTR(fan4_input, 0444, | 639 | static SENSOR_DEVICE_ATTR(fan4_input, 0444, |
642 | show_rpm, NULL, 4); | 640 | show_rpm, NULL, 3); |
643 | static SENSOR_DEVICE_ATTR(fan5_input, 0444, | 641 | static SENSOR_DEVICE_ATTR(fan5_input, 0444, |
644 | show_rpm, NULL, 5); | 642 | show_rpm, NULL, 4); |
645 | static SENSOR_DEVICE_ATTR(fan6_input, 0444, | 643 | static SENSOR_DEVICE_ATTR(fan6_input, 0444, |
646 | show_rpm, NULL, 6); | 644 | show_rpm, NULL, 5); |
647 | static SENSOR_DEVICE_ATTR(fan7_input, 0444, | 645 | static SENSOR_DEVICE_ATTR(fan7_input, 0444, |
648 | show_rpm, NULL, 7); | 646 | show_rpm, NULL, 6); |
649 | static SENSOR_DEVICE_ATTR(fan8_input, 0444, | 647 | static SENSOR_DEVICE_ATTR(fan8_input, 0444, |
650 | show_rpm, NULL, 8); | 648 | show_rpm, NULL, 7); |
651 | static SENSOR_DEVICE_ATTR(fan9_input, 0444, | 649 | static SENSOR_DEVICE_ATTR(fan9_input, 0444, |
652 | show_rpm, NULL, 9); | 650 | show_rpm, NULL, 8); |
653 | static SENSOR_DEVICE_ATTR(fan10_input, 0444, | 651 | static SENSOR_DEVICE_ATTR(fan10_input, 0444, |
654 | show_rpm, NULL, 10); | 652 | show_rpm, NULL, 9); |
655 | static SENSOR_DEVICE_ATTR(fan11_input, 0444, | 653 | static SENSOR_DEVICE_ATTR(fan11_input, 0444, |
656 | show_rpm, NULL, 11); | 654 | show_rpm, NULL, 10); |
657 | static SENSOR_DEVICE_ATTR(fan12_input, 0444, | 655 | static SENSOR_DEVICE_ATTR(fan12_input, 0444, |
658 | show_rpm, NULL, 12); | 656 | show_rpm, NULL, 11); |
659 | static SENSOR_DEVICE_ATTR(fan13_input, 0444, | 657 | static SENSOR_DEVICE_ATTR(fan13_input, 0444, |
660 | show_rpm, NULL, 13); | 658 | show_rpm, NULL, 12); |
661 | static SENSOR_DEVICE_ATTR(fan14_input, 0444, | 659 | static SENSOR_DEVICE_ATTR(fan14_input, 0444, |
662 | show_rpm, NULL, 14); | 660 | show_rpm, NULL, 13); |
663 | static SENSOR_DEVICE_ATTR(fan15_input, 0444, | 661 | static SENSOR_DEVICE_ATTR(fan15_input, 0444, |
662 | show_rpm, NULL, 14); | ||
663 | static SENSOR_DEVICE_ATTR(fan16_input, 0444, | ||
664 | show_rpm, NULL, 15); | 664 | show_rpm, NULL, 15); |
665 | static struct attribute *fan_dev_attrs[] = { | 665 | static struct attribute *fan_dev_attrs[] = { |
666 | &sensor_dev_attr_fan0_input.dev_attr.attr, | ||
667 | &sensor_dev_attr_fan1_input.dev_attr.attr, | 666 | &sensor_dev_attr_fan1_input.dev_attr.attr, |
668 | &sensor_dev_attr_fan2_input.dev_attr.attr, | 667 | &sensor_dev_attr_fan2_input.dev_attr.attr, |
669 | &sensor_dev_attr_fan3_input.dev_attr.attr, | 668 | &sensor_dev_attr_fan3_input.dev_attr.attr, |
@@ -679,6 +678,7 @@ static struct attribute *fan_dev_attrs[] = { | |||
679 | &sensor_dev_attr_fan13_input.dev_attr.attr, | 678 | &sensor_dev_attr_fan13_input.dev_attr.attr, |
680 | &sensor_dev_attr_fan14_input.dev_attr.attr, | 679 | &sensor_dev_attr_fan14_input.dev_attr.attr, |
681 | &sensor_dev_attr_fan15_input.dev_attr.attr, | 680 | &sensor_dev_attr_fan15_input.dev_attr.attr, |
681 | &sensor_dev_attr_fan16_input.dev_attr.attr, | ||
682 | NULL | 682 | NULL |
683 | }; | 683 | }; |
684 | 684 | ||