diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-01-19 12:51:06 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-01-19 12:12:40 -0800 |
commit | 23268785b288c25ab5ee2ec523982546b5353880 (patch) | |
tree | 48256ebfa0e72a2de740cfd6f7a214e6a59d498a /drivers/staging/greybus/connection.h | |
parent | 192bee4b1a7adbf16d12721c77d6268c76428323 (diff) | |
download | linux-23268785b288c25ab5ee2ec523982546b5353880.tar.bz2 |
greybus: connection: make connection enable/disable thread safe
Add connection mutex to protect connection enabling and disabling.
This is needed to eventually allow drivers to manage the state of their
connections during operation (i.e. post probe and pre disconnect).
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.h')
-rw-r--r-- | drivers/staging/greybus/connection.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h index b774b9c56744..e7c6feb76e80 100644 --- a/drivers/staging/greybus/connection.h +++ b/drivers/staging/greybus/connection.h @@ -43,6 +43,7 @@ struct gb_connection { u8 module_major; u8 module_minor; + struct mutex mutex; spinlock_t lock; enum gb_connection_state state; struct list_head operations; |