Changes in uspace/lib/drv/generic/remote_usbhc.c [b7fd2a0:25a179e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usbhc.c
rb7fd2a0 r25a179e 96 96 } usbhc_iface_funcs_t; 97 97 98 errno_t usbhc_read(async_exch_t *exch, usb_address_t address,98 int usbhc_read(async_exch_t *exch, usb_address_t address, 99 99 usb_endpoint_t endpoint, uint64_t setup, void *data, size_t size, 100 100 size_t *rec_size) … … 131 131 132 132 /* Wait for the answer. */ 133 errno_t data_request_rc;134 errno_t opening_request_rc;133 int data_request_rc; 134 int opening_request_rc; 135 135 async_wait_for(data_request, &data_request_rc); 136 136 async_wait_for(opening_request, &opening_request_rc); … … 139 139 /* Prefer the return code of the opening request. */ 140 140 if (opening_request_rc != EOK) { 141 return ( errno_t) opening_request_rc;141 return (int) opening_request_rc; 142 142 } else { 143 return ( errno_t) data_request_rc;143 return (int) data_request_rc; 144 144 } 145 145 } 146 146 if (opening_request_rc != EOK) { 147 return ( errno_t) opening_request_rc;147 return (int) opening_request_rc; 148 148 } 149 149 … … 152 152 } 153 153 154 errno_t usbhc_write(async_exch_t *exch, usb_address_t address,154 int usbhc_write(async_exch_t *exch, usb_address_t address, 155 155 usb_endpoint_t endpoint, uint64_t setup, const void *data, size_t size) 156 156 { … … 174 174 /* Send the data if any. */ 175 175 if (size > 0) { 176 const errno_t ret = async_data_write_start(exch, data, size);176 const int ret = async_data_write_start(exch, data, size); 177 177 if (ret != EOK) { 178 178 async_forget(opening_request); … … 182 182 183 183 /* Wait for the answer. */ 184 errno_t opening_request_rc;184 int opening_request_rc; 185 185 async_wait_for(opening_request, &opening_request_rc); 186 186 187 return ( errno_t) opening_request_rc;187 return (int) opening_request_rc; 188 188 } 189 189 … … 235 235 } 236 236 237 static void callback_out( errno_t outcome, void *arg)237 static void callback_out(int outcome, void *arg) 238 238 { 239 239 async_transaction_t *trans = arg; … … 244 244 } 245 245 246 static void callback_in( errno_t outcome, size_t actual_size, void *arg)246 static void callback_in(int outcome, size_t actual_size, void *arg) 247 247 { 248 248 async_transaction_t *trans = (async_transaction_t *)arg; … … 306 306 } 307 307 308 const errno_t rc = hc_iface->read(308 const int rc = hc_iface->read( 309 309 fun, target, setup, trans->buffer, size, callback_in, trans); 310 310 … … 344 344 size_t size = 0; 345 345 if (data_buffer_len > 0) { 346 const errno_t rc = async_data_write_accept(&trans->buffer, false,346 const int rc = async_data_write_accept(&trans->buffer, false, 347 347 1, USB_MAX_PAYLOAD_SIZE, 348 348 0, &size); … … 355 355 } 356 356 357 const errno_t rc = hc_iface->write(357 const int rc = hc_iface->write( 358 358 fun, target, setup, trans->buffer, size, callback_out, trans); 359 359
Note:
See TracChangeset
for help on using the changeset viewer.