summaryrefslogtreecommitdiff
path: root/udev_device.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-08-27 16:15:41 +0200
committerKay Sievers <kay.sievers@suse.de>2005-08-27 16:15:41 +0200
commitfb17920701dcba0d94e3fde566788a868e41d1ad (patch)
tree7667c49dd48312ec58ab12d4da92cb9206bb6b69 /udev_device.c
parent314edf3ca44b268fa70a7a87a106322e2dd461af (diff)
add and use name_list_cleanup() for cleaning up the string lists
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev_device.c')
-rw-r--r--udev_device.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/udev_device.c b/udev_device.c
index 45bb6a2876..db72d3007d 100644
--- a/udev_device.c
+++ b/udev_device.c
@@ -103,19 +103,7 @@ int udev_init_device(struct udevice *udev, const char* devpath, const char *subs
void udev_cleanup_device(struct udevice *udev)
{
- struct name_entry *name_loop;
- struct name_entry *temp_loop;
-
- list_for_each_entry_safe(name_loop, temp_loop, &udev->symlink_list, node) {
- list_del(&name_loop->node);
- free(name_loop);
- }
- list_for_each_entry_safe(name_loop, temp_loop, &udev->run_list, node) {
- list_del(&name_loop->node);
- free(name_loop);
- }
- list_for_each_entry_safe(name_loop, temp_loop, &udev->env_list, node) {
- list_del(&name_loop->node);
- free(name_loop);
- }
+ name_list_cleanup(&udev->symlink_list);
+ name_list_cleanup(&udev->run_list);
+ name_list_cleanup(&udev->env_list);
}