summaryrefslogtreecommitdiff
path: root/namedev.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-03-10 05:15:07 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:51:00 -0700
commit882af735ec18cb4e6ba6f59ca60f8266cc96c330 (patch)
tree9a2953bd0ea3c94cbf8dcda3b42842b959e07347 /namedev.c
parent783272f045faf39325678eef0d55a41d7306e2d3 (diff)
[PATCH] remove PLACE key match
ID should do the same, cause we walk up the chain of devices on the physical device and can match for the name of every device there with the ID key.
Diffstat (limited to 'namedev.c')
-rw-r--r--namedev.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/namedev.c b/namedev.c
index 4b3674935a..cd1f2de989 100644
--- a/namedev.c
+++ b/namedev.c
@@ -531,28 +531,6 @@ static int match_id(struct config_device *dev, struct sysfs_device *sysfs_device
return 0;
}
-static int match_place(struct config_device *dev, struct sysfs_device *sysfs_device)
-{
- char path[PATH_SIZE];
- char *temp;
-
- strlcpy(path, sysfs_device->path, sizeof(path));
- temp = strrchr(path, '/');
- dbg("search '%s' in '%s', path='%s'", dev->place, temp, path);
- if (strstr(temp, dev->place) != NULL)
- return 0;
-
- /* try the parent */
- temp[0] = '\0';
- temp = strrchr(path, '/');
- dbg("search '%s' in '%s', path='%s'", dev->place, temp, path);
- if (strstr(temp, dev->place) == NULL)
- return 0;
-
- dbg("place doesn't match");
- return -ENODEV;
-}
-
static int match_rule(struct udevice *udev, struct config_device *dev,
struct sysfs_class_device *class_dev, struct sysfs_device *sysfs_device)
{
@@ -622,20 +600,6 @@ static int match_rule(struct udevice *udev, struct config_device *dev,
dbg(FIELD_ID " matches");
}
- /* check for matching place of device */
- if (dev->place[0] != '\0') {
- if (sysfs_device == NULL) {
- dbg("device has no sysfs_device");
- goto try_parent;
- }
- dbg("check " FIELD_PLACE);
- if (match_place(dev, sysfs_device) != 0) {
- dbg(FIELD_PLACE " is not matching");
- goto try_parent;
- }
- dbg(FIELD_PLACE " matches");
- }
-
/* check for matching sysfs pairs */
if (dev->sysfs_pair[0].file[0] != '\0') {
dbg("check " FIELD_SYSFS " pairs");