summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/operation.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-07-22 17:49:18 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2015-07-22 11:10:33 -0700
commita4e08469ebd913e8145b8ab3ad0b40cfdd451240 (patch)
tree6fcbbfe7207d51fc31c011fdd7b69adb210c9312 /drivers/staging/greybus/operation.c
parentb4bd734ea60c4fd5a79c0e7fff4940686ff3cbc8 (diff)
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>
Diffstat (limited to 'drivers/staging/greybus/operation.c')
-rw-r--r--drivers/staging/greybus/operation.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c
index e98fc656c98b..6b87bcd63615 100644
--- a/drivers/staging/greybus/operation.c
+++ b/drivers/staging/greybus/operation.c
@@ -778,7 +778,8 @@ err_put:
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);