Changeset f9d0a86 in mainline for uspace/lib/drv/generic/remote_usbhc.c
- Timestamp:
- 2017-11-14T12:24:42Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6cad776
- Parents:
- 887c9de (diff), d2d142a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Aearsis <Hlavaty.Ondrej@…> (2017-11-14 01:04:19)
- git-committer:
- Aearsis <Hlavaty.Ondrej@…> (2017-11-14 12:24:42)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usbhc.c
r887c9de rf9d0a86 39 39 #include <errno.h> 40 40 #include <devman.h> 41 #include <usb/host/usb_transfer_batch.h>42 41 43 42 #include "usbhc_iface.h" … … 445 444 } 446 445 447 static int callback_out( usb_transfer_batch_t *batch)448 { 449 async_transaction_t *trans = batch->on_complete_data;450 451 const int err = async_answer_0(trans->caller, batch->error);446 static int callback_out(void *arg, int error, size_t transfered_size) 447 { 448 async_transaction_t *trans = arg; 449 450 const int err = async_answer_0(trans->caller, error); 452 451 453 452 async_transaction_destroy(trans); … … 456 455 } 457 456 458 static int callback_in( usb_transfer_batch_t *batch)459 { 460 async_transaction_t *trans = batch->on_complete_data;457 static int callback_in(void *arg, int error, size_t transfered_size) 458 { 459 async_transaction_t *trans = arg; 461 460 462 461 if (trans->data_caller) { 463 if ( batch->error == EOK) {464 batch->error = async_data_read_finalize(trans->data_caller,465 trans->buffer, batch->transfered_size);462 if (error == EOK) { 463 error = async_data_read_finalize(trans->data_caller, 464 trans->buffer, transfered_size); 466 465 } else { 467 466 async_answer_0(trans->data_caller, EINTR); … … 469 468 } 470 469 471 const int err = async_answer_0(trans->caller, batch->error);470 const int err = async_answer_0(trans->caller, error); 472 471 async_transaction_destroy(trans); 473 472 return err;
Note:
See TracChangeset
for help on using the changeset viewer.