Ignore:
File:
1 edited

Legend:

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

    r7f80313 r9d58539  
    3636#include <async.h>
    3737#include <errno.h>
    38 #include <macros.h>
    3938
    4039#include "usb_iface.h"
     
    5756{
    5857        if (!exch)
    59                 return EBADMEM;
     58                return EINVAL;
    6059        sysarg_t addr;
    6160        const int ret = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE),
     
    6665        return ret;
    6766}
    68 
     67/*----------------------------------------------------------------------------*/
    6968/** Tell interface number given device can use.
    7069 * @param[in] exch IPC communication exchange
     
    7675{
    7776        if (!exch)
    78                 return EBADMEM;
     77                return EINVAL;
    7978        sysarg_t iface_no;
    8079        const int ret = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE),
     
    8483        return ret;
    8584}
    86 
     85/*----------------------------------------------------------------------------*/
    8786/** Tell devman handle of device host controller.
    8887 * @param[in] exch IPC communication exchange
     
    9392{
    9493        if (!exch)
    95                 return EBADMEM;
     94                return EINVAL;
    9695        devman_handle_t h;
    9796        const int ret = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE),
     
    108107
    109108/** Remote USB interface operations. */
    110 static const remote_iface_func_ptr_t remote_usb_iface_ops [] = {
     109static remote_iface_func_ptr_t remote_usb_iface_ops [] = {
    111110        [IPC_M_USB_GET_MY_ADDRESS] = remote_usb_get_my_address,
    112111        [IPC_M_USB_GET_MY_INTERFACE] = remote_usb_get_my_interface,
     
    116115/** Remote USB interface structure.
    117116 */
    118 const remote_iface_t remote_usb_iface = {
    119         .method_count = ARRAY_SIZE(remote_usb_iface_ops),
     117remote_iface_t remote_usb_iface = {
     118        .method_count = sizeof(remote_usb_iface_ops) /
     119            sizeof(remote_usb_iface_ops[0]),
    120120        .methods = remote_usb_iface_ops
    121121};
    122122
    123 
     123/*----------------------------------------------------------------------------*/
    124124void remote_usb_get_my_address(ddf_fun_t *fun, void *iface,
    125125    ipc_callid_t callid, ipc_call_t *call)
     
    140140        }
    141141}
    142 
     142/*----------------------------------------------------------------------------*/
    143143void remote_usb_get_my_interface(ddf_fun_t *fun, void *iface,
    144144    ipc_callid_t callid, ipc_call_t *call)
     
    159159        }
    160160}
    161 
     161/*----------------------------------------------------------------------------*/
    162162void remote_usb_get_hc_handle(ddf_fun_t *fun, void *iface,
    163163    ipc_callid_t callid, ipc_call_t *call)
Note: See TracChangeset for help on using the changeset viewer.