summaryrefslogtreecommitdiff
path: root/namedev.c
diff options
context:
space:
mode:
Diffstat (limited to 'namedev.c')
-rw-r--r--namedev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/namedev.c b/namedev.c
index 59ec08c715..e4e585b5cd 100644
--- a/namedev.c
+++ b/namedev.c
@@ -477,8 +477,9 @@ static int match_id(struct config_device *dev, struct sysfs_class_device *class_
strfieldcpy(path, sysfs_device->path);
temp = strrchr(path, '/');
+ temp++;
dbg("search '%s' in '%s', path='%s'", dev->id, temp, path);
- if (strstr(temp, dev->id) == NULL)
+ if (strcmp_pattern(dev->id, temp) != 0)
return -ENODEV;
else
return 0;