- list_for_each(tmp, &config_device_list) {
- dev = list_entry(tmp, struct config_device, node);
- if (dev->type != NUMBER)
- continue;
-
- dbg("dev->bus='%s' sysfs_device->bus='%s'", dev->bus, sysfs_device->bus);
- if (strcasecmp(dev->bus, sysfs_device->bus) != 0)
- continue;
-
- found = 0;
- strfieldcpy(path, sysfs_device->path);
- temp = strrchr(path, '/');
- dbg("search '%s' in '%s', path='%s'", dev->id, temp, path);
- if (strstr(temp, dev->id) != NULL) {
- found = 1;
- } else {
- *temp = 0x00;
- temp = strrchr(path, '/');
- dbg("search '%s' in '%s', path='%s'", dev->id, temp, path);
- if (strstr(temp, dev->id) != NULL)
- found = 1;
- }
- if (!found)
- continue;
- strfieldcpy(udev->name, dev->name);
- strfieldcpy(udev->symlink, dev->symlink);
- dbg("found matching id '%s', '%s' becomes '%s'",
- dev->id, class_dev->name, udev->name);
+ strfieldcpy(path, sysfs_device->path);
+ temp = strrchr(path, '/');
+ temp++;
+ dbg("search '%s' in '%s', path='%s'", dev->id, temp, path);
+ if (strcmp_pattern(dev->id, temp) != 0)
+ return -ENODEV;
+ else