Changeset d03ade7 in mainline for uspace/drv/uhci/uhci.c


Ignore:
Timestamp:
2011-01-25T21:25:39Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ee87f6
Parents:
b00163f
Message:

Enqueue transfers

Fix malloc check in uhci_add_transfer()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci/uhci.c

    rb00163f rd03ade7  
    1313static inline int uhci_add_transfer(
    1414  device_t *dev,
    15         usb_target_t target,
    16   usb_transfer_type_t transfer_type,
    17         usb_packet_id pid,
     15  usb_target_t target,
     16  usb_transfer_type_t transfer_type,
     17  usb_packet_id pid,
    1818  void *buffer, size_t size,
    1919  usbhc_iface_transfer_out_callback_t callback_out,
    2020  usbhc_iface_transfer_in_callback_t callback_in,
    21         void *arg );
     21  void *arg );
    2222
    2323int uhci_init(device_t *device, void *regs)
     
    164164static inline int uhci_add_transfer(
    165165  device_t *dev,
    166         usb_target_t target,
    167   usb_transfer_type_t transfer_type,
    168         usb_packet_id pid,
     166  usb_target_t target,
     167  usb_transfer_type_t transfer_type,
     168  usb_packet_id pid,
    169169  void *buffer, size_t size,
    170170  usbhc_iface_transfer_out_callback_t callback_out,
    171171  usbhc_iface_transfer_in_callback_t callback_in,
    172         void *arg )
     172  void *arg )
    173173{
    174174        // TODO: Add support for isochronous transfers
     
    203203
    204204        td = trans_malloc(sizeof(transfer_descriptor_t));
    205         ret = td ? ENOMEM : EOK;
    206         CHECK_RET_TRANS_FREE_JOB_TD("Failed to allocate tranfer descriptor.\n");
     205        ret = td ? EOK : ENOMEM;
     206        CHECK_RET_TRANS_FREE_JOB_TD("Failed to allocate transfer descriptor.\n");
    207207
    208208        ret = transfer_descriptor_init(td, 3, size, false, target, pid);
Note: See TracChangeset for help on using the changeset viewer.