Changes in uspace/lib/drv/generic/remote_usb.c [9d58539:7f80313] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usb.c
r9d58539 r7f80313 36 36 #include <async.h> 37 37 #include <errno.h> 38 #include <macros.h> 38 39 39 40 #include "usb_iface.h" … … 56 57 { 57 58 if (!exch) 58 return E INVAL;59 return EBADMEM; 59 60 sysarg_t addr; 60 61 const int ret = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE), … … 65 66 return ret; 66 67 } 67 /*----------------------------------------------------------------------------*/ 68 68 69 /** Tell interface number given device can use. 69 70 * @param[in] exch IPC communication exchange … … 75 76 { 76 77 if (!exch) 77 return E INVAL;78 return EBADMEM; 78 79 sysarg_t iface_no; 79 80 const int ret = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE), … … 83 84 return ret; 84 85 } 85 /*----------------------------------------------------------------------------*/ 86 86 87 /** Tell devman handle of device host controller. 87 88 * @param[in] exch IPC communication exchange … … 92 93 { 93 94 if (!exch) 94 return E INVAL;95 return EBADMEM; 95 96 devman_handle_t h; 96 97 const int ret = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE), … … 107 108 108 109 /** Remote USB interface operations. */ 109 static remote_iface_func_ptr_t remote_usb_iface_ops [] = {110 static const remote_iface_func_ptr_t remote_usb_iface_ops [] = { 110 111 [IPC_M_USB_GET_MY_ADDRESS] = remote_usb_get_my_address, 111 112 [IPC_M_USB_GET_MY_INTERFACE] = remote_usb_get_my_interface, … … 115 116 /** Remote USB interface structure. 116 117 */ 117 remote_iface_t remote_usb_iface = { 118 .method_count = sizeof(remote_usb_iface_ops) / 119 sizeof(remote_usb_iface_ops[0]), 118 const remote_iface_t remote_usb_iface = { 119 .method_count = ARRAY_SIZE(remote_usb_iface_ops), 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.