diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-03-14 04:01:54 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:53:18 -0700 |
commit | d6d1a18d7245b8065df95775c6d45fe2d8f2e66a (patch) | |
tree | 8930ec099c307325704023d6fa5d6439e848e7e4 | |
parent | fc90ce812d052b4c766d91769456b42ba0051cb1 (diff) |
[PATCH] remove unneeded code, libsysfs does this for us
-rw-r--r-- | udev_rules.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/udev_rules.c b/udev_rules.c index 551c06131b..f09d6d47bf 100644 --- a/udev_rules.c +++ b/udev_rules.c @@ -498,21 +498,6 @@ static int compare_sysfs_attribute(struct sysfs_class_device *class_dev, struct return 0; } -static int match_id(struct udev_rule *rule, struct sysfs_device *sysfs_device) -{ - char path[PATH_SIZE]; - char *temp; - - strlcpy(path, sysfs_device->path, sizeof(path)); - temp = strrchr(path, '/'); - temp++; - dbg("search '%s' in '%s', path='%s'", rule->id, temp, path); - if (strcmp_pattern(rule->id, temp) != 0) - return -ENODEV; - - return 0; -} - static int match_rule(struct udevice *udev, struct udev_rule *rule, struct sysfs_class_device *class_dev, struct sysfs_device *sysfs_device) { @@ -622,7 +607,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule, goto try_parent; } dbg("check " KEY_ID); - if (match_id(rule, sysfs_device) != 0) { + if (strcmp_pattern(rule->id, sysfs_device->bus_id) != 0) { dbg(KEY_ID " is not matching"); if (rule->id_operation != KEY_OP_NOMATCH) goto try_parent; |