mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
greybus: operation: clean up greybus_message_sent
Add connection variable to greybus_message_sent. This will be put to more use by a follow-up up patch. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Tested-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
b4bd734ea6
commit
a4e08469eb
1 changed files with 3 additions and 3 deletions
|
@ -778,7 +778,8 @@ static int gb_operation_response_send(struct gb_operation *operation,
|
|||
void greybus_message_sent(struct greybus_host_device *hd,
|
||||
struct gb_message *message, int status)
|
||||
{
|
||||
struct gb_operation *operation;
|
||||
struct gb_operation *operation = message->operation;
|
||||
struct gb_connection *connection = operation->connection;
|
||||
|
||||
/*
|
||||
* If the message was a response, we just need to drop our
|
||||
|
@ -790,10 +791,9 @@ void greybus_message_sent(struct greybus_host_device *hd,
|
|||
* attempting to send it, record that as the result of
|
||||
* the operation and schedule its completion.
|
||||
*/
|
||||
operation = message->operation;
|
||||
if (message == operation->response) {
|
||||
if (status) {
|
||||
dev_err(&operation->connection->dev,
|
||||
dev_err(&connection->dev,
|
||||
"error sending response: %d\n", status);
|
||||
}
|
||||
gb_operation_put_active(operation);
|
||||
|
|
Loading…
Reference in a new issue