aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-06-25 15:42:14 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-07-01 18:56:05 -0400
commit7f2c0662e5cfd05f12ca49109e8f787bf2d87b66 (patch)
treeea02b0563dc56f3f86ccbae14ea494926dc8a21c
parentb0af8dfdd67699e25083478c63eedef2e72ebd85 (diff)
hwmon: (pmbus) Drop check for PMBus revision register in probe function
Some PMBus devices do not support the PMBus revision register, so don't check if it exists. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com> Cc: stable.kernel.org # 2.6.39
-rw-r--r--drivers/hwmon/pmbus_core.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/hwmon/pmbus_core.c b/drivers/hwmon/pmbus_core.c
index 354770ed3186..744672c1f26d 100644
--- a/drivers/hwmon/pmbus_core.c
+++ b/drivers/hwmon/pmbus_core.c
@@ -1430,14 +1430,9 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id,
1430 i2c_set_clientdata(client, data); 1430 i2c_set_clientdata(client, data);
1431 mutex_init(&data->update_lock); 1431 mutex_init(&data->update_lock);
1432 1432
1433 /* 1433 /* Bail out if PMBus status register does not exist. */
1434 * Bail out if status register or PMBus revision register 1434 if (i2c_smbus_read_byte_data(client, PMBUS_STATUS_BYTE) < 0) {
1435 * does not exist. 1435 dev_err(&client->dev, "PMBus status register not found\n");
1436 */
1437 if (i2c_smbus_read_byte_data(client, PMBUS_STATUS_BYTE) < 0
1438 || i2c_smbus_read_byte_data(client, PMBUS_REVISION) < 0) {
1439 dev_err(&client->dev,
1440 "Status or revision register not found\n");
1441 ret = -ENODEV; 1436 ret = -ENODEV;
1442 goto out_data; 1437 goto out_data;
1443 } 1438 }