hwmon: (pmbus) Use device specific function to read fan configuration
authorGuenter Roeck <guenter.roeck@ericsson.com>
Wed, 9 Mar 2011 15:23:54 +0000 (07:23 -0800)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Thu, 19 May 2011 15:19:39 +0000 (08:19 -0700)
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>
drivers/hwmon/pmbus_core.c

index 43ec1057c1f7c6ecf41b279c600e9d10390f6be0..98799bab69ce44a19b61afc3ce7ab64074504da8 100644 (file)
@@ -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)))))