Changeset 02fc5c4 in mainline for uspace/lib/usb/src/hc.c


Ignore:
Timestamp:
2011-11-25T17:41:23Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
095bddfc
Parents:
56bdd9a4
Message:

usbhc: Export IPC wrapper instead of IPC call numbers.

Hide IPC protocol in one file, instead of multiple client implementations.
Rename 'find_by_address' ⇒ 'get_handle'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/hc.c

    r56bdd9a4 r02fc5c4  
    153153        if (!usb_hc_connection_is_opened(connection))
    154154                return ENOENT;
    155        
     155
    156156        async_exch_t *exch = async_exchange_begin(connection->hc_sess);
    157        
    158         sysarg_t tmp;
    159         int rc = async_req_2_1(exch, DEV_IFACE_ID(USBHC_DEV_IFACE),
    160             IPC_M_USBHC_GET_HANDLE_BY_ADDRESS,
    161             address, &tmp);
    162        
     157        if (!exch)
     158                return ENOMEM;
     159        const int ret = usbhc_get_handle(exch, address, handle);
    163160        async_exchange_end(exch);
    164        
    165         if ((rc == EOK) && (handle != NULL))
    166                 *handle = tmp;
    167        
    168         return rc;
     161        return ret;
    169162}
    170163
Note: See TracChangeset for help on using the changeset viewer.