diff options
Diffstat (limited to 'drivers/slimbus/messaging.c')
| -rw-r--r-- | drivers/slimbus/messaging.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c index 242570a5e565..e2dbe4a66b70 100644 --- a/drivers/slimbus/messaging.c +++ b/drivers/slimbus/messaging.c @@ -13,8 +13,8 @@ * * @ctrl: Controller handle * @reply: Reply received from the device - * @len: Length of the reply * @tid: Transaction ID received with which framework can associate reply. + * @len: Length of the reply * * Called by controller to inform framework about the response received. * This helps in making the API asynchronous, and controller-driver doesn't need @@ -143,13 +143,12 @@ int slim_do_transfer(struct slim_controller *ctrl, struct slim_msg_txn *txn) if (!txn->msg->comp) txn->comp = &done; - else - txn->comp = txn->comp; } ret = ctrl->xfer_msg(ctrl, txn); - - if (!ret && need_tid && !txn->msg->comp) { + if (ret == -ETIMEDOUT) { + slim_free_txn_tid(ctrl, txn); + } else if (!ret && need_tid && !txn->msg->comp) { unsigned long ms = txn->rl + HZ; time_left = wait_for_completion_timeout(txn->comp, @@ -223,7 +222,7 @@ static u16 slim_slicesize(int code) /** * slim_xfer_msg() - Transfer a value info message on slim device * - * @sbdev: slim device to which this msg has to be transfered + * @sbdev: slim device to which this msg has to be transferred * @msg: value info message pointer * @mc: message code of the message * |
