Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 4e9ecf4 in mainline


Ignore:
Timestamp:
2011-08-31T22:58:04Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
master
Children:
9a790ad1
Parents:
9c10e51
Message:

libusbhost: remove unused elements

Location:
uspace/lib/usbhost
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/batch.h

    r9c10e51 r4e9ecf4  
    4444struct usb_transfer_batch {
    4545        endpoint_t *ep;
    46         link_t link;
    4746        usbhc_iface_transfer_in_callback_t callback_in;
    4847        usbhc_iface_transfer_out_callback_t callback_out;
    4948        void *arg;
    5049        char *buffer;
    51         char *data_buffer;
    5250        size_t buffer_size;
    5351        char *setup_buffer;
    5452        size_t setup_size;
    5553        size_t transfered_size;
    56         void (*next_step)(usb_transfer_batch_t *);
    5754        int error;
    5855        ddf_fun_t *fun;
     
    7875    endpoint_t *ep,
    7976    char *buffer,
    80     char *data_buffer,
    8177    size_t buffer_size,
    8278    char *setup_buffer,
     
    127123        usb_transfer_batch_finish(instance, data, size);
    128124}
    129 /*----------------------------------------------------------------------------*/
    130 static inline usb_transfer_batch_t *usb_transfer_batch_from_link(link_t *l)
    131 {
    132         assert(l);
    133         return list_get_instance(l, usb_transfer_batch_t, link);
    134 }
    135 
    136125#endif
    137126/**
  • uspace/lib/usbhost/src/batch.c

    r9c10e51 r4e9ecf4  
    4343    endpoint_t *ep,
    4444    char *buffer,
    45     char *data_buffer,
    4645    size_t buffer_size,
    4746    char *setup_buffer,
     
    5756        usb_transfer_batch_t *instance = malloc(sizeof(usb_transfer_batch_t));
    5857        if (instance) {
    59                 link_initialize(&instance->link);
    6058                instance->ep = ep;
    6159                instance->callback_in = func_in;
     
    6361                instance->arg = arg;
    6462                instance->buffer = buffer;
    65                 instance->data_buffer = data_buffer;
    6663                instance->buffer_size = buffer_size;
    6764                instance->setup_buffer = setup_buffer;
     
    7168                instance->private_data_dtor = private_data_dtor;
    7269                instance->transfered_size = 0;
    73                 instance->next_step = NULL;
    7470                instance->error = EOK;
    7571                if (instance->ep)
     
    113109        assert(instance);
    114110        assert(instance->callback_in);
    115 
    116         /* We are data in, we need data */
    117         if (instance->data_buffer && (instance->buffer != instance->data_buffer))
    118                 memcpy(instance->buffer,
    119                     instance->data_buffer, instance->buffer_size);
    120111
    121112        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " completed (%zuB): %s.\n",
  • uspace/lib/usbhost/src/iface.c

    r9c10e51 r4e9ecf4  
    7878        /* No private data and no private data dtor */
    7979        usb_transfer_batch_t *batch =
    80             usb_transfer_batch_get(ep, data, NULL, size, setup_data,
    81                 setup_size, in, out, arg, fun, NULL, NULL);
     80            usb_transfer_batch_get(ep, data, size, setup_data, setup_size,
     81            in, out, arg, fun, NULL, NULL);
    8282        if (!batch) {
    8383                return ENOMEM;
Note: See TracChangeset for help on using the changeset viewer.