i2cdetect: add a check for (mode == DETECT_MODE_AUTO)
authorBartosz Golaszewski <bartekgola@gmail.com>
Fri, 5 Jun 2015 08:27:30 +0000 (10:27 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 7 Jun 2015 16:05:47 +0000 (18:05 +0200)
We should only warn the user about addresses to be skipped if
(mode == DETECT_MODE_AUTO).

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/i2c_tools.c

index 6f9787280e3e30b156f69decc02daaa36c53db42..16784e948fc192ce355a4b54f74fe687a9f5eddc 100644 (file)
@@ -1336,7 +1336,9 @@ int i2cdetect_main(int argc UNUSED_PARAM, char **argv)
        } else
        if (mode == DETECT_MODE_READ && !(funcs & I2C_FUNC_SMBUS_READ_BYTE)) {
                no_support("SMBus Receive Byte command");
-       } else {
+       }
+
+       if (mode == DETECT_MODE_AUTO) {
                if (!(funcs & I2C_FUNC_SMBUS_QUICK))
                        will_skip("SMBus Quick Write");
                if (!(funcs & I2C_FUNC_SMBUS_READ_BYTE))