diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-02-21 13:48:10 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:36:13 -0700 |
commit | 8f2f6e426fc4cc1fa39b864a1792428a4269b751 (patch) | |
tree | efacf88145a24ec9767099c50f313b4900dc5e86 /namedev.c | |
parent | 311a2b0a1d65a1bd02bbedda0dda90f10d6b6788 (diff) |
[PATCH] cleanup db functions
Diffstat (limited to 'namedev.c')
-rw-r--r-- | namedev.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -299,6 +299,8 @@ static void apply_format(struct udevice *udev, char *string, size_t maxsize, } break; case 'P': + if (!class_dev) + break; class_dev_parent = sysfs_get_classdev_parent(class_dev); if (class_dev_parent != NULL) { struct udevice udev_parent; @@ -306,8 +308,7 @@ static void apply_format(struct udevice *udev, char *string, size_t maxsize, dbg("found parent '%s', get the node name", class_dev_parent->path); memset(&udev_parent, 0x00, sizeof(struct udevice)); /* lookup the name in the udev_db with the DEVPATH of the parent */ - strfieldcpy(udev_parent.devpath, &class_dev_parent->path[strlen(sysfs_path)]); - if (udev_db_get_device(&udev_parent) == 0) { + if (udev_db_get_device_by_devpath(&udev_parent, &class_dev_parent->path[strlen(sysfs_path)]) == 0) { strfieldcatmax(string, udev_parent.name, maxsize); dbg("substitute parent node name'%s'", udev_parent.name); } else |