ChangeSet 1.1832.55.27, 2004/09/05 05:21:45+02:00, [EMAIL PROTECTED] [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: Domen Puncer <[EMAIL PROTECTED]> Signed-off-by: Maximilian Attems <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> drivers/usb/host/hc_sl811.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff -Nru a/drivers/usb/host/hc_sl811.c b/drivers/usb/host/hc_sl811.c --- a/drivers/usb/host/hc_sl811.c 2004-10-19 08:18:06 -07:00 +++ b/drivers/usb/host/hc_sl811.c 2004-10-19 08:18:06 -07:00 @@ -1343,15 +1343,11 @@ *****************************************************************/ 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); ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel