Commit 827900c5 authored by Jean Delvare's avatar Jean Delvare

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: default avatarJean Delvare <khali@linux-fr.org>
parent e467e104
...@@ -1428,13 +1428,12 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver) ...@@ -1428,13 +1428,12 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
if (!(adapter->class & driver->class)) if (!(adapter->class & driver->class))
goto exit_free; goto exit_free;
/* Stop here if we can't use SMBUS_QUICK */ /* Stop here if the bus doesn't support probing */
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) { if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_READ_BYTE)) {
if (address_list[0] == I2C_CLIENT_END) if (address_list[0] == I2C_CLIENT_END)
goto exit_free; goto exit_free;
dev_warn(&adapter->dev, "SMBus Quick command not supported, " dev_warn(&adapter->dev, "Probing not supported\n");
"can't probe for chips\n");
err = -EOPNOTSUPP; err = -EOPNOTSUPP;
goto exit_free; goto exit_free;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment