Changeset 296d22fc in mainline for uspace/lib/usbhost/src/usb_transfer_batch.c
- Timestamp:
- 2018-01-25T02:05:57Z (7 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/usb_transfer_batch.c
rd369b3b r296d22fc 54 54 55 55 bus_t *bus = endpoint_get_bus(ep); 56 const bus_ops_t *ops = BUS_OPS_LOOKUP(bus->ops, batch_create);57 56 58 if (! ops) {57 if (!bus->ops->batch_create) { 59 58 usb_transfer_batch_t *batch = calloc(1, sizeof(usb_transfer_batch_t)); 60 59 if (!batch) … … 64 63 } 65 64 66 return ops->batch_create(ep);65 return bus->ops->batch_create(ep); 67 66 } 68 67 … … 87 86 88 87 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; 90 89 91 /* Batch reference */ 92 endpoint_del_ref(batch->ep); 93 94 if (ops) { 90 if (bus->ops) { 95 91 usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " destroying.", 96 92 batch, USB_TRANSFER_BATCH_ARGS(*batch)); 97 ops->batch_destroy(batch);93 bus->ops->batch_destroy(batch); 98 94 } 99 95 else { … … 102 98 free(batch); 103 99 } 100 101 /* Batch reference */ 102 endpoint_del_ref(ep); 104 103 } 105 104
Note:
See TracChangeset
for help on using the changeset viewer.