Changeset 23b0fe8 in mainline


Ignore:
Timestamp:
2011-08-25T13:16:45Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e20eaed
Parents:
90dd59d
Message:

libusbhost,uhci,ohci: Remove batch init hook.

Hw specific inintialization is a part of the scheduling process.

Location:
uspace
Files:
4 edited

Legend:

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

    r90dd59d r23b0fe8  
    203203        instance->generic.private_data = instance;
    204204        instance->generic.schedule = schedule;
    205         instance->generic.batch_init_hook = batch_init_ohci;
    206205        instance->generic.ep_add_hook = NULL;
    207206
  • uspace/drv/bus/usb/uhci/hc.c

    r90dd59d r23b0fe8  
    198198        instance->generic.private_data = instance;
    199199        instance->generic.schedule = hc_schedule;
    200         instance->generic.batch_init_hook = batch_init_uhci;
    201200        instance->generic.ep_add_hook = NULL;
     201
    202202#undef CHECK_RET_DEST_FUN_RETURN
    203203
     
    382382        assert(instance);
    383383        assert(batch);
     384        int ret = batch_init_uhci(batch);
     385        if (ret != EOK) {
     386                return ret;
     387        }
    384388
    385389        transfer_list_t *list =
  • uspace/lib/usbhost/include/usb/host/hcd.h

    r90dd59d r23b0fe8  
    5151        int (*schedule)(hcd_t *, usb_transfer_batch_t *);
    5252        int (*ep_add_hook)(hcd_t *, endpoint_t *);
    53         int (*batch_init_hook)(usb_transfer_batch_t *);
    5453};
    5554/*----------------------------------------------------------------------------*/
  • uspace/lib/usbhost/src/iface.c

    r90dd59d r23b0fe8  
    7878        }
    7979
    80         /* No private data and no private data_dtor, these should be set by
    81          * batch_init_hook*/
     80        /* No private data and no private data dtor, these will be set later */
    8281        usb_transfer_batch_init(batch, ep, data, NULL, size, setup_data,
    8382            setup_size, in, out, arg, fun, NULL, NULL);
    84         if (hcd->batch_init_hook) {
    85                 ret = hcd->batch_init_hook(batch);
    86                 if (ret != EOK)
    87                         goto out;
    88         } else {
    89                 usb_log_warning("Missing batch_private_data constructor!\n");
    90         }
     83
    9184        if (hcd->schedule) {
    9285                ret = hcd->schedule(hcd, batch);
     
    204197                return ENOMEM;
    205198        int ret = EOK;
     199
    206200        if (hcd->ep_add_hook) {
    207                 ret = hcd->ep_add_hook(ep);
     201                ret = hcd->ep_add_hook(hcd, ep);
    208202        }
    209203        if (ret != EOK) {
Note: See TracChangeset for help on using the changeset viewer.