Ignore:
Timestamp:
2018-01-25T02:05:57Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fa4b12d5
Parents:
d369b3b
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-25 02:03:48)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-25 02:05:57)
Message:

usbhub: revert the runtime binding of bus methods

It was just a dead end.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/usb_transfer_batch.c

    rd369b3b r296d22fc  
    5454
    5555        bus_t *bus = endpoint_get_bus(ep);
    56         const bus_ops_t *ops = BUS_OPS_LOOKUP(bus->ops, batch_create);
    5756
    58         if (!ops) {
     57        if (!bus->ops->batch_create) {
    5958                usb_transfer_batch_t *batch = calloc(1, sizeof(usb_transfer_batch_t));
    6059                if (!batch)
     
    6463        }
    6564
    66         return ops->batch_create(ep);
     65        return bus->ops->batch_create(ep);
    6766}
    6867
     
    8786
    8887        bus_t *bus = endpoint_get_bus(batch->ep);
    89         const bus_ops_t *ops = BUS_OPS_LOOKUP(bus->ops, batch_destroy);
     88        endpoint_t *ep = batch->ep;
    9089
    91         /* Batch reference */
    92         endpoint_del_ref(batch->ep);
    93 
    94         if (ops) {
     90        if (bus->ops) {
    9591                usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " destroying.",
    9692                    batch, USB_TRANSFER_BATCH_ARGS(*batch));
    97                 ops->batch_destroy(batch);
     93                bus->ops->batch_destroy(batch);
    9894        }
    9995        else {
     
    10298                free(batch);
    10399        }
     100
     101        /* Batch reference */
     102        endpoint_del_ref(ep);
    104103}
    105104
Note: See TracChangeset for help on using the changeset viewer.