Changeset 4deca9b in mainline for uspace/drv/uhci-hcd/iface.c


Ignore:
Timestamp:
2011-04-12T11:43:35Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
651b352
Parents:
1324ff3 (diff), 910ca3f (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:

Extensive cleanup, preparation for OHCI rework

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/iface.c

    r1324ff3 r4deca9b  
    148148        assert(hc);
    149149        const size_t size = max_packet_size;
    150         int ret;
    151150        usb_speed_t speed = usb_device_keeper_get_speed(&hc->manager, address);
    152151        if (speed >= USB_SPEED_MAX) {
     
    157156            usb_str_speed(speed), direction, size, max_packet_size, interval);
    158157
    159 
    160         endpoint_t *ep = malloc(sizeof(endpoint_t));
    161         if (ep == NULL)
    162                 return ENOMEM;
    163         ret = endpoint_init(ep, address, endpoint, direction,
    164             transfer_type, speed, max_packet_size);
    165         if (ret != EOK) {
    166                 free(ep);
    167                 return ret;
    168         }
    169 
    170         ret = usb_endpoint_manager_register_ep(&hc->ep_manager, ep, size);
    171         if (ret != EOK) {
    172                 endpoint_destroy(ep);
    173         }
    174         return ret;
     158        return usb_endpoint_manager_add_ep(&hc->ep_manager, address, endpoint,
     159            direction, transfer_type, speed, max_packet_size, size);
    175160}
    176161/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.