Changeset c83a55c in mainline for uspace/drv/bus/usb/ohci/hc.c


Ignore:
Timestamp:
2011-10-31T06:52:54Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c25e39b
Parents:
e8ab32f (diff), 3ce78580 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline

File:
1 edited

Legend:

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

    re8ab32f rc83a55c  
    142142if (ret != EOK) { \
    143143        usb_log_error(message); \
    144         usb_endpoint_manager_unregister_ep( \
    145             &instance->generic.ep_manager, hub_address, 0, USB_DIRECTION_BOTH);\
     144        usb_endpoint_manager_remove_ep( \
     145            &instance->generic.ep_manager, hub_address, 0, USB_DIRECTION_BOTH, \
     146            NULL, NULL);\
    146147        usb_device_manager_release( \
    147148            &instance->generic.dev_manager, hub_address); \
     
    150151        int ret = usb_endpoint_manager_add_ep(
    151152            &instance->generic.ep_manager, hub_address, 0, USB_DIRECTION_BOTH,
    152             USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64, 0);
     153            USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64, 0, NULL, NULL);
    153154        CHECK_RET_UNREG_RETURN(ret,
    154155            "Failed to register root hub control endpoint: %s.\n",
     
    192193        list_initialize(&instance->pending_batches);
    193194
    194         ret = hcd_init(&instance->generic, BANDWIDTH_AVAILABLE_USB11,
     195        hcd_init(&instance->generic, BANDWIDTH_AVAILABLE_USB11,
    195196            bandwidth_count_usb11);
    196         CHECK_RET_RETURN(ret, "Failed to initialize generic driver: %s.\n",
    197             str_error(ret));
    198197        instance->generic.private_data = instance;
    199198        instance->generic.schedule = hc_schedule;
    200199        instance->generic.ep_add_hook = ohci_endpoint_init;
     200        instance->generic.ep_remove_hook = ohci_endpoint_fini;
    201201
    202202        ret = hc_init_memory(instance);
     
    221221}
    222222/*----------------------------------------------------------------------------*/
    223 void hc_enqueue_endpoint(hc_t *instance, endpoint_t *ep)
    224 {
     223void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep)
     224{
     225        assert(instance);
     226        assert(ep);
     227
    225228        endpoint_list_t *list = &instance->lists[ep->transfer_type];
    226229        ohci_endpoint_t *ohci_ep = ohci_endpoint_get(ep);
     230        assert(list);
     231        assert(ohci_ep);
     232
    227233        /* Enqueue ep */
    228234        switch (ep->transfer_type) {
     
    247253}
    248254/*----------------------------------------------------------------------------*/
    249 void hc_dequeue_endpoint(hc_t *instance, endpoint_t *ep)
    250 {
     255void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep)
     256{
     257        assert(instance);
     258        assert(ep);
     259
    251260        /* Dequeue ep */
    252261        endpoint_list_t *list = &instance->lists[ep->transfer_type];
    253262        ohci_endpoint_t *ohci_ep = ohci_endpoint_get(ep);
     263
     264        assert(list);
     265        assert(ohci_ep);
    254266        switch (ep->transfer_type) {
    255267        case USB_TRANSFER_CONTROL:
Note: See TracChangeset for help on using the changeset viewer.