summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2018-09-18 19:57:11 +0300
committerGuenter Roeck <linux@roeck-us.net>2018-10-11 06:37:13 +0300
commitb2833f397dc1443b4db8c7b363d8dc41af805054 (patch)
tree30fe1bee16ac199c376111789466b58ac943dbf0
parenta4e0a080cad80bb2522eb541868cc48c5e68ba72 (diff)
downloadlinux-b2833f397dc1443b4db8c7b363d8dc41af805054.tar.xz
hwmon: (nct6775) Improve instruction grouping
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>
-rw-r--r--drivers/hwmon/nct6775.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
index 0f20f7c2a96b..0ad4bf0ab8be 100644
--- a/drivers/hwmon/nct6775.c
+++ b/drivers/hwmon/nct6775.c
@@ -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);
}