Skip to content

Commit

Permalink
hwmon: (nct6775) Improve instruction grouping
Browse files Browse the repository at this point in the history
When determining support for a given fan or pwm control, the code is
easier to read if the necessary instructions are grouped together.

No functional change.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Guenter Roeck committed Oct 11, 2018
1 parent a4e0a08 commit b2833f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/hwmon/nct6775.c
Original file line number Diff line number Diff line change
Expand Up @@ -3530,16 +3530,16 @@ nct6775_check_fan_inputs(struct nct6775_data *data)
case nct6795:
case nct6796:
pwm5pin |= cr2d & BIT(7);

fan5pin |= cr1b & BIT(5);

if (data->kind != nct6796) {
fan6pin = !dsw_en && (cr2d & BIT(1));
pwm6pin = !dsw_en && (cr2d & BIT(0));

fan5pin |= creb & BIT(5);
pwm5pin |= (creb & BIT(4)) && !(cr2a & BIT(0));

fan6pin = !dsw_en && (cr2d & BIT(1));
fan6pin |= creb & BIT(3);

pwm6pin = !dsw_en && (cr2d & BIT(0));
pwm6pin |= creb & BIT(2);
}

Expand Down

0 comments on commit b2833f3

Please sign in to comment.