Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/usb_bus.c

    r516d361 rb7fd2a0  
    105105 * @return Error code.
    106106 */
    107 static int usb_bus_get_free_address(usb_bus_t *instance, usb_address_t *address)
     107static errno_t usb_bus_get_free_address(usb_bus_t *instance, usb_address_t *address)
    108108{
    109109
     
    200200 * @return Error code.
    201201 */
    202 int usb_bus_init(usb_bus_t *instance,
     202errno_t usb_bus_init(usb_bus_t *instance,
    203203    size_t available_bandwidth, bw_count_func_t bw_count, usb_speed_t max_speed)
    204204{
     
    224224 * @return Error code.
    225225 */
    226 int usb_bus_register_ep(usb_bus_t *instance, endpoint_t *ep, size_t data_size)
     226errno_t usb_bus_register_ep(usb_bus_t *instance, endpoint_t *ep, size_t data_size)
    227227{
    228228        assert(instance);
     
    262262 * @return Error code.
    263263 */
    264 int usb_bus_unregister_ep(usb_bus_t *instance, endpoint_t *ep)
     264errno_t usb_bus_unregister_ep(usb_bus_t *instance, endpoint_t *ep)
    265265{
    266266        assert(instance);
     
    316316 * @return Error code.
    317317 */
    318 int usb_bus_add_ep(usb_bus_t *instance,
     318errno_t usb_bus_add_ep(usb_bus_t *instance,
    319319    usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction,
    320320    usb_transfer_type_t type, size_t max_packet_size, unsigned packets,
     
    364364
    365365        if (callback) {
    366                 const int ret = callback(ep, arg);
     366                const errno_t ret = callback(ep, arg);
    367367                if (ret != EOK) {
    368368                        fibril_mutex_unlock(&instance->guard);
     
    394394 * @return Error code.
    395395 */
    396 int usb_bus_remove_ep(usb_bus_t *instance,
     396errno_t usb_bus_remove_ep(usb_bus_t *instance,
    397397    usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction,
    398398    ep_remove_callback_t callback, void *arg)
     
    417417}
    418418
    419 int usb_bus_reset_toggle(usb_bus_t *instance, usb_target_t target, bool all)
     419errno_t usb_bus_reset_toggle(usb_bus_t *instance, usb_target_t target, bool all)
    420420{
    421421        assert(instance);
     
    423423                return EINVAL;
    424424
    425         int ret = ENOENT;
     425        errno_t ret = ENOENT;
    426426
    427427        fibril_mutex_lock(&instance->guard);
     
    446446 * @return Error code.
    447447 */
    448 int usb_bus_remove_address(usb_bus_t *instance,
     448errno_t usb_bus_remove_address(usb_bus_t *instance,
    449449    usb_address_t address, ep_remove_callback_t callback, void *arg)
    450450{
     
    455455        fibril_mutex_lock(&instance->guard);
    456456
    457         const int ret = instance->devices[address].occupied ? EOK : ENOENT;
     457        const errno_t ret = instance->devices[address].occupied ? EOK : ENOENT;
    458458        instance->devices[address].occupied = false;
    459459
     
    481481 * @note Default address is only available in strict mode.
    482482 */
    483 int usb_bus_request_address(usb_bus_t *instance,
     483errno_t usb_bus_request_address(usb_bus_t *instance,
    484484    usb_address_t *address, bool strict, usb_speed_t speed)
    485485{
     
    493493
    494494        usb_address_t addr = *address;
    495         int rc;
     495        errno_t rc;
    496496
    497497        fibril_mutex_lock(&instance->guard);
     
    539539 * @return Error code.
    540540 */
    541 int usb_bus_get_speed(usb_bus_t *instance, usb_address_t address,
     541errno_t usb_bus_get_speed(usb_bus_t *instance, usb_address_t address,
    542542    usb_speed_t *speed)
    543543{
     
    549549        fibril_mutex_lock(&instance->guard);
    550550
    551         const int ret = instance->devices[address].occupied ? EOK : ENOENT;
     551        const errno_t ret = instance->devices[address].occupied ? EOK : ENOENT;
    552552        if (speed && instance->devices[address].occupied) {
    553553                *speed = instance->devices[address].speed;
Note: See TracChangeset for help on using the changeset viewer.