From a003ec9cff2924284cda9f4e8bb5fbc2f6e78578 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 25 Sep 2005 16:50:06 +0200 Subject: [PATCH] --- yaml --- r: 10599 b: refs/heads/master c: 4366dc946c01305cff49b07dabb806d2364f1edb h: refs/heads/master i: 10597: 0fdffb6a5b792bf0901e078213e97da15ddcbdaf 10595: 2ddb1e9450774eaa891dc6825e58d2dcc36bef53 10591: 9003d08a82d844bf949687bbc3d1d463161a4db9 v: v3 --- [refs] | 2 +- trunk/drivers/i2c/i2c-core.c | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 8deedfb0c20c..5bb58c3f6016 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cb929eae78ec0b243dbf58039bce4af354f6020c +refs/heads/master: 4366dc946c01305cff49b07dabb806d2364f1edb diff --git a/trunk/drivers/i2c/i2c-core.c b/trunk/drivers/i2c/i2c-core.c index 45aa0e54e297..b55097d57b7a 100644 --- a/trunk/drivers/i2c/i2c-core.c +++ b/trunk/drivers/i2c/i2c-core.c @@ -706,10 +706,6 @@ int i2c_probe(struct i2c_adapter *adapter, int i, err; int adap_id = i2c_adapter_id(adapter); - /* Forget it if we can't probe using SMBUS_QUICK */ - if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_QUICK)) - return -1; - /* Force entries are done first, and are not affected by ignore entries */ if (address_data->forces) { @@ -736,6 +732,17 @@ int i2c_probe(struct i2c_adapter *adapter, } } + /* Stop here if we can't use SMBUS_QUICK */ + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) { + if (address_data->probe[0] == I2C_CLIENT_END + && address_data->normal_i2c[0] == I2C_CLIENT_END) + return 0; + + dev_warn(&adapter->dev, "SMBus Quick command not supported, " + "can't probe for chips\n"); + return -1; + } + /* Probe entries are done second, and are not affected by ignore entries either */ for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) {