diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-07-14 15:43:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-07-15 12:39:13 -0700 |
commit | 5a3be769e92ea993f8a8c27b89571c276d874733 (patch) | |
tree | 72a61b98fa4272814d2cce4859abe9e30bf3220b /drivers/staging/greybus/connection.c | |
parent | 0eb8c1159839dcb6c97fba82e5a8698d9c30f815 (diff) | |
download | linux-stable-5a3be769e92ea993f8a8c27b89571c276d874733.tar.gz linux-stable-5a3be769e92ea993f8a8c27b89571c276d874733.tar.bz2 linux-stable-5a3be769e92ea993f8a8c27b89571c276d874733.zip |
greybus: operation: split incoming and outgoing cancellation
Split incoming and outgoing operation-cancellation helpers.
Incoming operations are only cancelled as part of connection tear down
and is specifically not needed in the driver API.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r-- | drivers/staging/greybus/connection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index ac9b2d174805..81a5df0e3230 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -238,7 +238,11 @@ static void gb_connection_cancel_operations(struct gb_connection *connection, gb_operation_get(operation); spin_unlock_irq(&connection->lock); - gb_operation_cancel(operation, errno); + if (gb_operation_is_incoming(operation)) + gb_operation_cancel_incoming(operation, errno); + else + gb_operation_cancel(operation, errno); + gb_operation_put(operation); spin_lock_irq(&connection->lock); |