aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck2011-03-09 07:23:54 -0800
committerGuenter Roeck2011-05-19 08:19:39 -0700
commit6586b14c7bdec22f59dc749ead1d01d542d793b6 (patch)
treeb29738f3a07f670013e0a854c0151a7a78304a03 /drivers/hwmon
parent2cfa6aedb32c9c1226094ed383dc3c9b3e2ecddb (diff)
hwmon: (pmbus) Use device specific function to read fan configuration
Fan control implementation tends to be device specific, so start using the device specific function call to read fan configuration registers. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Reviewed-by: Tom Grennan <tom.grennan@ericsson.com>
Diffstat (limited to 'drivers/hwmon')
-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,
break;
if (!pmbus_check_word_register(client, page,
- pmbus_fan_registers[f])
- || !pmbus_check_byte_register(client, page,
- pmbus_fan_config_registers[f]))
+ pmbus_fan_registers[f]))
break;
/*
@@ -1305,7 +1303,7 @@ static void pmbus_add_fan_attributes(struct i2c_client *client,
* Each fan configuration register covers multiple fans,
* so we have to do some magic.
*/
- regval = pmbus_read_byte_data(client, page,
+ regval = _pmbus_read_byte_data(client, page,
pmbus_fan_config_registers[f]);
if (regval < 0 ||
(!(regval & (PB_FAN_1_INSTALLED >> ((f & 1) * 4)))))