aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-08-28 02:33:23 -0400
committerJean Delvare <khali@mahadeva.delvare>2008-08-28 02:33:23 -0400
commit4329cf8613b0c7cdc020005f0e1ea7378681f1d8 (patch)
treeb3c0fc13eb33018fc67ee9a7b4a4a9c308b1695d /drivers/i2c
parent96e21e4fbc1b83a3445553381ec74f904618562e (diff)
i2c: Prevent log spam on some DVB adapters
Some DVB adapters do not support the special I2C transaction that we use for probing purposes. There's no point in logging this event, as there's nothing the user can do and in general there is no actual problem. So, degrade one of these messages to a debug message, and move the other one around so that it is only printed on bogus drivers. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Uwe Bugla <uwe.bugla@gmx.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/i2c-core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 4ac33670797f..b346a687ab59 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1190,8 +1190,8 @@ int i2c_probe(struct i2c_adapter *adapter,
1190 && address_data->normal_i2c[0] == I2C_CLIENT_END) 1190 && address_data->normal_i2c[0] == I2C_CLIENT_END)
1191 return 0; 1191 return 0;
1192 1192
1193 dev_warn(&adapter->dev, "SMBus Quick command not supported, " 1193 dev_dbg(&adapter->dev, "SMBus Quick command not supported, "
1194 "can't probe for chips\n"); 1194 "can't probe for chips\n");
1195 return -EOPNOTSUPP; 1195 return -EOPNOTSUPP;
1196 } 1196 }
1197 1197
@@ -1352,6 +1352,10 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
1352 } 1352 }
1353 } 1353 }
1354 1354
1355 /* Stop here if the classes do not match */
1356 if (!(adapter->class & driver->class))
1357 goto exit_free;
1358
1355 /* Stop here if we can't use SMBUS_QUICK */ 1359 /* Stop here if we can't use SMBUS_QUICK */
1356 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) { 1360 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) {
1357 if (address_data->probe[0] == I2C_CLIENT_END 1361 if (address_data->probe[0] == I2C_CLIENT_END
@@ -1364,10 +1368,6 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
1364 goto exit_free; 1368 goto exit_free;
1365 } 1369 }
1366 1370
1367 /* Stop here if the classes do not match */
1368 if (!(adapter->class & driver->class))
1369 goto exit_free;
1370
1371 /* Probe entries are done second, and are not affected by ignore 1371 /* Probe entries are done second, and are not affected by ignore
1372 entries either */ 1372 entries either */
1373 for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) { 1373 for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) {