Changes in uspace/lib/drv/generic/remote_usbhid.c [a44424f:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usbhid.c
ra44424f rb7fd2a0 94 94 * @param dev_sess Session to DDF device providing USB HID interface. 95 95 * 96 * @return Number of usages returned or negativeerror code.97 * 98 */ 99 int usbhid_dev_get_event_length(async_sess_t *dev_sess, size_t *size)96 * @return Number of usages returned or an error code. 97 * 98 */ 99 errno_t usbhid_dev_get_event_length(async_sess_t *dev_sess, size_t *size) 100 100 { 101 101 if (!dev_sess) … … 105 105 106 106 sysarg_t len; 107 int rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE),107 errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE), 108 108 IPC_M_USBHID_GET_EVENT_LENGTH, &len); 109 109 … … 132 132 * 133 133 */ 134 int usbhid_dev_get_event(async_sess_t *dev_sess, uint8_t *buf,134 errno_t usbhid_dev_get_event(async_sess_t *dev_sess, uint8_t *buf, 135 135 size_t size, size_t *actual_size, int *event_nr, unsigned int flags) 136 136 { … … 174 174 } 175 175 176 sysarg_t data_request_rc;177 sysarg_t opening_request_rc;176 errno_t data_request_rc; 177 errno_t opening_request_rc; 178 178 async_wait_for(data_request, &data_request_rc); 179 179 async_wait_for(opening_request, &opening_request_rc); … … 182 182 /* Prefer return code of the opening request. */ 183 183 if (opening_request_rc != EOK) 184 return ( int) opening_request_rc;184 return (errno_t) opening_request_rc; 185 185 else 186 return ( int) data_request_rc;186 return (errno_t) data_request_rc; 187 187 } 188 188 189 189 if (opening_request_rc != EOK) 190 return ( int) opening_request_rc;190 return (errno_t) opening_request_rc; 191 191 192 192 size_t act_size = IPC_GET_ARG2(data_request_call); … … 204 204 } 205 205 206 int usbhid_dev_get_report_descriptor_length(async_sess_t *dev_sess,206 errno_t usbhid_dev_get_report_descriptor_length(async_sess_t *dev_sess, 207 207 size_t *size) 208 208 { … … 213 213 214 214 sysarg_t arg_size; 215 int rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE),215 errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE), 216 216 IPC_M_USBHID_GET_REPORT_DESCRIPTOR_LENGTH, &arg_size); 217 217 … … 226 226 } 227 227 228 int usbhid_dev_get_report_descriptor(async_sess_t *dev_sess, uint8_t *buf,228 errno_t usbhid_dev_get_report_descriptor(async_sess_t *dev_sess, uint8_t *buf, 229 229 size_t size, size_t *actual_size) 230 230 { … … 259 259 } 260 260 261 sysarg_t data_request_rc;262 sysarg_t opening_request_rc;261 errno_t data_request_rc; 262 errno_t opening_request_rc; 263 263 async_wait_for(data_request, &data_request_rc); 264 264 async_wait_for(opening_request, &opening_request_rc); … … 267 267 /* Prefer return code of the opening request. */ 268 268 if (opening_request_rc != EOK) 269 return ( int) opening_request_rc;269 return (errno_t) opening_request_rc; 270 270 else 271 return ( int) data_request_rc;271 return (errno_t) data_request_rc; 272 272 } 273 273 274 274 if (opening_request_rc != EOK) 275 return ( int) opening_request_rc;275 return (errno_t) opening_request_rc; 276 276 277 277 size_t act_size = IPC_GET_ARG2(data_request_call); … … 362 362 } 363 363 364 int rc;364 errno_t rc; 365 365 366 366 uint8_t *data = malloc(len); … … 438 438 439 439 size_t act_len = 0; 440 int rc = hid_iface->get_report_descriptor(fun, descriptor, len,440 errno_t rc = hid_iface->get_report_descriptor(fun, descriptor, len, 441 441 &act_len); 442 442 if (act_len > len) {
Note:
See TracChangeset
for help on using the changeset viewer.