Commit c0759750 authored by Maximilian Attems's avatar Maximilian Attems Committed by Greg Kroah-Hartman

[PATCH] list_for_each_entry: drivers-usb-host-hc_sl811.c

Make code more readable with list_for_each_entry_safe.
(Is this a non i386? I can't compile it.)
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 094be4f3
......@@ -1343,15 +1343,11 @@ static int __init hci_hcd_init (void)
*****************************************************************/
static void __exit hci_hcd_cleanup (void)
{
struct list_head *hci_l;
hci_t *hci;
hci_t *hci, *tmp;
DBGFUNC ("Enter hci_hcd_cleanup\n");
for (hci_l = hci_hcd_list.next; hci_l != &hci_hcd_list;) {
hci = list_entry (hci_l, hci_t, hci_hcd_list);
hci_l = hci_l->next;
list_for_each_entry_safe(hci, tmp, &hci_hcd_list, hci_hcd_list)
hc_release_hci (hci);
}
}
module_init (hci_hcd_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment