Changeset ad5f149 in mainline


Ignore:
Timestamp:
2013-12-31T01:21:35Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
643e7ba
Parents:
639db552
Message:

uhci: Use foreach_safe to iterate through list.

Location:
uspace/drv/bus/usb/uhci
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/hc.c

    r639db552 rad5f149  
    162162                    &instance->transfers_bulk_full, &done);
    163163
    164                 while (!list_empty(&done)) {
    165                         link_t *item = list_first(&done);
    166                         list_remove(item);
     164                list_foreach_safe(done, current, next) {
     165                        list_remove(current);
    167166                        uhci_transfer_batch_t *batch =
    168                             uhci_transfer_batch_from_link(item);
     167                            uhci_transfer_batch_from_link(current);
    169168                        uhci_transfer_batch_finish_dispose(batch);
    170169                }
  • uspace/drv/bus/usb/uhci/uhci_batch.c

    r639db552 rad5f149  
    7070        assert(uhci_batch);
    7171        assert(uhci_batch->usb_batch);
     72        assert(!link_in_use(&uhci_batch->link));
    7273        usb_transfer_batch_finish(uhci_batch->usb_batch,
    7374            uhci_transfer_batch_data_buffer(uhci_batch));
Note: See TracChangeset for help on using the changeset viewer.