Changeset 3842a955 in mainline for uspace/drv/uhci/transfer_list.c


Ignore:
Timestamp:
2011-06-19T15:59:42Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
26e7d6d
Parents:
9724d7f (diff), 74464e8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci/transfer_list.c

    r9724d7f r3842a955  
    121121        } else {
    122122                /* There is something scheduled */
    123                 usb_transfer_batch_t *last =
    124                     usb_transfer_batch_from_link(instance->batch_list.prev);
     123                usb_transfer_batch_t *last = usb_transfer_batch_from_link(
     124                    list_last(&instance->batch_list));
    125125                last_qh = batch_qh(last);
    126126        }
     
    146146}
    147147/*----------------------------------------------------------------------------*/
    148 /** Add completed bantches to the provided list.
     148/** Add completed batches to the provided list.
    149149 *
    150150 * @param[in] instance List to use.
    151151 * @param[in] done list to fill
    152152 */
    153 void transfer_list_remove_finished(transfer_list_t *instance, link_t *done)
     153void transfer_list_remove_finished(transfer_list_t *instance, list_t *done)
    154154{
    155155        assert(instance);
     
    157157
    158158        fibril_mutex_lock(&instance->guard);
    159         link_t *current = instance->batch_list.next;
    160         while (current != &instance->batch_list) {
     159        link_t *current = instance->batch_list.head.next;
     160        while (current != &instance->batch_list.head) {
    161161                link_t * const next = current->next;
    162162                usb_transfer_batch_t *batch =
     
    181181        fibril_mutex_lock(&instance->guard);
    182182        while (!list_empty(&instance->batch_list)) {
    183                 link_t * const current = instance->batch_list.next;
     183                link_t * const current = list_first(&instance->batch_list);
    184184                usb_transfer_batch_t *batch =
    185185                    usb_transfer_batch_from_link(current);
     
    212212        qh_t *prev_qh = NULL;
    213213        /* Remove from the hardware queue */
    214         if (instance->batch_list.next == &batch->link) {
     214        if (list_first(&instance->batch_list) == &batch->link) {
    215215                /* I'm the first one here */
    216216                prev_qh = instance->queue_head;
Note: See TracChangeset for help on using the changeset viewer.