aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2010-07-10 03:42:46 -0400
committerJean Delvare <khali@linux-fr.org>2010-07-10 03:42:46 -0400
commit827900c55665dc8e20b05bb18d3f6e078eaa6183 (patch)
tree11777ea285278026d01a1f84751e6b52dd6d4521
parente467e104bb7482170b79f516d2025e7cfcaaa733 (diff)
i2c: Fix probability check
The new unified probing function differs from the original code, and the preliminary test whether probing is possible must be updated accordingly. Signed-off-by: Jean Delvare <khali@linux-fr.org>
-rw-r--r--drivers/i2c/i2c-core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 1cca2631e5b3..0815e10da7c6 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1428,13 +1428,12 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
1428 if (!(adapter->class & driver->class)) 1428 if (!(adapter->class & driver->class))
1429 goto exit_free; 1429 goto exit_free;
1430 1430
1431 /* Stop here if we can't use SMBUS_QUICK */ 1431 /* Stop here if the bus doesn't support probing */
1432 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) { 1432 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_READ_BYTE)) {
1433 if (address_list[0] == I2C_CLIENT_END) 1433 if (address_list[0] == I2C_CLIENT_END)
1434 goto exit_free; 1434 goto exit_free;
1435 1435
1436 dev_warn(&adapter->dev, "SMBus Quick command not supported, " 1436 dev_warn(&adapter->dev, "Probing not supported\n");
1437 "can't probe for chips\n");
1438 err = -EOPNOTSUPP; 1437 err = -EOPNOTSUPP;
1439 goto exit_free; 1438 goto exit_free;
1440 } 1439 }