aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/pmbus_core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hwmon/pmbus_core.c b/drivers/hwmon/pmbus_core.c
index 43ec1057c1f7..98799bab69ce 100644
--- a/drivers/hwmon/pmbus_core.c
+++ b/drivers/hwmon/pmbus_core.c
@@ -1295,9 +1295,7 @@ static void pmbus_add_fan_attributes(struct i2c_client *client,
1295 break; 1295 break;
1296 1296
1297 if (!pmbus_check_word_register(client, page, 1297 if (!pmbus_check_word_register(client, page,
1298 pmbus_fan_registers[f]) 1298 pmbus_fan_registers[f]))
1299 || !pmbus_check_byte_register(client, page,
1300 pmbus_fan_config_registers[f]))
1301 break; 1299 break;
1302 1300
1303 /* 1301 /*
@@ -1305,7 +1303,7 @@ static void pmbus_add_fan_attributes(struct i2c_client *client,
1305 * Each fan configuration register covers multiple fans, 1303 * Each fan configuration register covers multiple fans,
1306 * so we have to do some magic. 1304 * so we have to do some magic.
1307 */ 1305 */
1308 regval = pmbus_read_byte_data(client, page, 1306 regval = _pmbus_read_byte_data(client, page,
1309 pmbus_fan_config_registers[f]); 1307 pmbus_fan_config_registers[f]);
1310 if (regval < 0 || 1308 if (regval < 0 ||
1311 (!(regval & (PB_FAN_1_INSTALLED >> ((f & 1) * 4))))) 1309 (!(regval & (PB_FAN_1_INSTALLED >> ((f & 1) * 4)))))