aboutsummaryrefslogtreecommitdiff
path: root/miscutils/i2c_tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/i2c_tools.c')
-rw-r--r--miscutils/i2c_tools.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 90d1e1e14..03bb03974 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -1198,7 +1198,7 @@ static void NORETURN list_i2c_busses_and_exit(void)
1198 if (subde->d_name[0] == '.') 1198 if (subde->d_name[0] == '.')
1199 continue; 1199 continue;
1200 1200
1201 if (strncmp(subde->d_name, "i2c-", 4) == 0) { 1201 if (is_prefixed_with(subde->d_name, "i2c-")) {
1202 snprintf(path, NAME_MAX, 1202 snprintf(path, NAME_MAX,
1203 "%s/%s/device/%s/name", 1203 "%s/%s/device/%s/name",
1204 i2cdev_path, de->d_name, 1204 i2cdev_path, de->d_name,
@@ -1229,7 +1229,7 @@ found:
1229 if (rv != 1) 1229 if (rv != 1)
1230 continue; 1230 continue;
1231 1231
1232 if (strncmp(name, "ISA", 3) == 0) 1232 if (is_prefixed_with(name, "ISA"))
1233 adt = ADT_ISA; 1233 adt = ADT_ISA;
1234 else 1234 else
1235 adt = i2cdetect_get_funcs(bus); 1235 adt = i2cdetect_get_funcs(bus);