summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/operation.h
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-07-14 15:43:26 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2015-07-15 12:39:13 -0700
commitfd7134a3cd0a1b3f91e66922534a796145c85eef (patch)
tree2516e903d1dccb76d9bc42672a0d5c031eb7419d /drivers/staging/greybus/operation.h
parent3eeac7e37ce9856e53693772dfe81a79b57b5a00 (diff)
downloadlinux-stable-fd7134a3cd0a1b3f91e66922534a796145c85eef.tar.gz
linux-stable-fd7134a3cd0a1b3f91e66922534a796145c85eef.tar.bz2
linux-stable-fd7134a3cd0a1b3f91e66922534a796145c85eef.zip
greybus: operation: make cancellation synchronous
Make sure to wait for the operation to become inactive before returning after having cancelled an operation. This makes sure that any ongoing operation completion callbacks have finished. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/operation.h')
-rw-r--r--drivers/staging/greybus/operation.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/operation.h b/drivers/staging/greybus/operation.h
index b32386636f6e..c8aaf90a006a 100644
--- a/drivers/staging/greybus/operation.h
+++ b/drivers/staging/greybus/operation.h
@@ -128,6 +128,7 @@ struct gb_operation {
struct kref kref;
atomic_t active;
+ atomic_t waiters;
struct list_head links; /* connection->operations */
};