Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_usbhid.c

    rb7fd2a0 ra44424f  
    9494 * @param dev_sess Session to DDF device providing USB HID interface.
    9595 *
    96  * @return Number of usages returned or an error code.
    97  *
    98  */
    99 errno_t usbhid_dev_get_event_length(async_sess_t *dev_sess, size_t *size)
     96 * @return Number of usages returned or negative error code.
     97 *
     98 */
     99int usbhid_dev_get_event_length(async_sess_t *dev_sess, size_t *size)
    100100{
    101101        if (!dev_sess)
     
    105105       
    106106        sysarg_t len;
    107         errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE),
     107        int rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE),
    108108            IPC_M_USBHID_GET_EVENT_LENGTH, &len);
    109109       
     
    132132 *
    133133 */
    134 errno_t usbhid_dev_get_event(async_sess_t *dev_sess, uint8_t *buf,
     134int usbhid_dev_get_event(async_sess_t *dev_sess, uint8_t *buf,
    135135    size_t size, size_t *actual_size, int *event_nr, unsigned int flags)
    136136{
     
    174174        }
    175175       
    176         errno_t data_request_rc;
    177         errno_t opening_request_rc;
     176        sysarg_t data_request_rc;
     177        sysarg_t opening_request_rc;
    178178        async_wait_for(data_request, &data_request_rc);
    179179        async_wait_for(opening_request, &opening_request_rc);
     
    182182                /* Prefer return code of the opening request. */
    183183                if (opening_request_rc != EOK)
    184                         return (errno_t) opening_request_rc;
     184                        return (int) opening_request_rc;
    185185                else
    186                         return (errno_t) data_request_rc;
     186                        return (int) data_request_rc;
    187187        }
    188188       
    189189        if (opening_request_rc != EOK)
    190                 return (errno_t) opening_request_rc;
     190                return (int) opening_request_rc;
    191191       
    192192        size_t act_size = IPC_GET_ARG2(data_request_call);
     
    204204}
    205205
    206 errno_t usbhid_dev_get_report_descriptor_length(async_sess_t *dev_sess,
     206int usbhid_dev_get_report_descriptor_length(async_sess_t *dev_sess,
    207207    size_t *size)
    208208{
     
    213213       
    214214        sysarg_t arg_size;
    215         errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE),
     215        int rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE),
    216216            IPC_M_USBHID_GET_REPORT_DESCRIPTOR_LENGTH, &arg_size);
    217217       
     
    226226}
    227227
    228 errno_t usbhid_dev_get_report_descriptor(async_sess_t *dev_sess, uint8_t *buf,
     228int usbhid_dev_get_report_descriptor(async_sess_t *dev_sess, uint8_t *buf,
    229229    size_t size, size_t *actual_size)
    230230{
     
    259259        }
    260260       
    261         errno_t data_request_rc;
    262         errno_t opening_request_rc;
     261        sysarg_t data_request_rc;
     262        sysarg_t opening_request_rc;
    263263        async_wait_for(data_request, &data_request_rc);
    264264        async_wait_for(opening_request, &opening_request_rc);
     
    267267                /* Prefer return code of the opening request. */
    268268                if (opening_request_rc != EOK)
    269                         return (errno_t) opening_request_rc;
     269                        return (int) opening_request_rc;
    270270                else
    271                         return (errno_t) data_request_rc;
     271                        return (int) data_request_rc;
    272272        }
    273273       
    274274        if (opening_request_rc != EOK)
    275                 return (errno_t) opening_request_rc;
     275                return (int) opening_request_rc;
    276276       
    277277        size_t act_size = IPC_GET_ARG2(data_request_call);
     
    362362        }
    363363
    364         errno_t rc;
     364        int rc;
    365365
    366366        uint8_t *data = malloc(len);
     
    438438
    439439        size_t act_len = 0;
    440         errno_t rc = hid_iface->get_report_descriptor(fun, descriptor, len,
     440        int rc = hid_iface->get_report_descriptor(fun, descriptor, len,
    441441            &act_len);
    442442        if (act_len > len) {
Note: See TracChangeset for help on using the changeset viewer.