Changeset 5fd9c30 in mainline for uspace/drv/bus/usb/ohci/ohci_bus.c


Ignore:
Timestamp:
2017-10-21T20:52:56Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
766043c
Parents:
74b852b
Message:

usbhost refactoring: let transfer_batch be initialized by bus

Currently makes older HCs fail, work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci_bus.c

    r74b852b r5fd9c30  
    4040
    4141#include "ohci_bus.h"
     42#include "ohci_batch.h"
    4243#include "hc.h"
    4344
     
    141142        hc_dequeue_endpoint(bus->hc, ep);
    142143        return EOK;
     144}
    143145
     146static usb_transfer_batch_t *ohci_bus_create_batch(bus_t *bus, endpoint_t *ep)
     147{
     148        ohci_transfer_batch_t *batch = ohci_transfer_batch_create(ep);
     149        return &batch->base;
     150}
     151
     152static void ohci_bus_destroy_batch(usb_transfer_batch_t *batch)
     153{
     154        ohci_transfer_batch_destroy(ohci_transfer_batch_get(batch));
    144155}
    145156
     
    161172        ops->release_endpoint = ohci_release_ep;
    162173
     174        ops->create_batch = ohci_bus_create_batch;
     175        ops->destroy_batch = ohci_bus_destroy_batch;
     176
    163177        bus->hc = hc;
    164178
Note: See TracChangeset for help on using the changeset viewer.