Changes in uspace/lib/drv/generic/remote_usb.c [7f80313:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usb.c
r7f80313 r9d58539 36 36 #include <async.h> 37 37 #include <errno.h> 38 #include <macros.h>39 38 40 39 #include "usb_iface.h" … … 57 56 { 58 57 if (!exch) 59 return E BADMEM;58 return EINVAL; 60 59 sysarg_t addr; 61 60 const int ret = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE), … … 66 65 return ret; 67 66 } 68 67 /*----------------------------------------------------------------------------*/ 69 68 /** Tell interface number given device can use. 70 69 * @param[in] exch IPC communication exchange … … 76 75 { 77 76 if (!exch) 78 return E BADMEM;77 return EINVAL; 79 78 sysarg_t iface_no; 80 79 const int ret = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE), … … 84 83 return ret; 85 84 } 86 85 /*----------------------------------------------------------------------------*/ 87 86 /** Tell devman handle of device host controller. 88 87 * @param[in] exch IPC communication exchange … … 93 92 { 94 93 if (!exch) 95 return E BADMEM;94 return EINVAL; 96 95 devman_handle_t h; 97 96 const int ret = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE), … … 108 107 109 108 /** Remote USB interface operations. */ 110 static constremote_iface_func_ptr_t remote_usb_iface_ops [] = {109 static remote_iface_func_ptr_t remote_usb_iface_ops [] = { 111 110 [IPC_M_USB_GET_MY_ADDRESS] = remote_usb_get_my_address, 112 111 [IPC_M_USB_GET_MY_INTERFACE] = remote_usb_get_my_interface, … … 116 115 /** Remote USB interface structure. 117 116 */ 118 const remote_iface_t remote_usb_iface = { 119 .method_count = ARRAY_SIZE(remote_usb_iface_ops), 117 remote_iface_t remote_usb_iface = { 118 .method_count = sizeof(remote_usb_iface_ops) / 119 sizeof(remote_usb_iface_ops[0]), 120 120 .methods = remote_usb_iface_ops 121 121 }; 122 122 123 123 /*----------------------------------------------------------------------------*/ 124 124 void remote_usb_get_my_address(ddf_fun_t *fun, void *iface, 125 125 ipc_callid_t callid, ipc_call_t *call) … … 140 140 } 141 141 } 142 142 /*----------------------------------------------------------------------------*/ 143 143 void remote_usb_get_my_interface(ddf_fun_t *fun, void *iface, 144 144 ipc_callid_t callid, ipc_call_t *call) … … 159 159 } 160 160 } 161 161 /*----------------------------------------------------------------------------*/ 162 162 void remote_usb_get_hc_handle(ddf_fun_t *fun, void *iface, 163 163 ipc_callid_t callid, ipc_call_t *call)
Note:
See TracChangeset
for help on using the changeset viewer.