diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-01-19 12:51:24 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-01-19 12:17:13 -0800 |
commit | c6d64a19cdb39680460ab9f153e33843aa8c825c (patch) | |
tree | 5c90cbe230a28da1c5a1d18b680fd5dcdfff0d3b | |
parent | c3681f6c92df6c4ec834fc8e3fa1905e73952630 (diff) | |
download | linux-stable-c6d64a19cdb39680460ab9f153e33843aa8c825c.tar.gz linux-stable-c6d64a19cdb39680460ab9f153e33843aa8c825c.tar.bz2 linux-stable-c6d64a19cdb39680460ab9f153e33843aa8c825c.zip |
greybus: connection: drop the connection_mutex
Drop the useless connection_mutex that did not, and can not be used to
prevent connection lookup races in atomic context and therefore serves
no purpose.
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>
-rw-r--r-- | drivers/staging/greybus/connection.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 1d7c21e03bfa..bfd2c0dee056 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -66,8 +66,6 @@ void greybus_data_rcvd(struct gb_host_device *hd, u16 cport_id, } EXPORT_SYMBOL_GPL(greybus_data_rcvd); -static DEFINE_MUTEX(connection_mutex); - static void gb_connection_kref_release(struct kref *kref) { struct gb_connection *connection; @@ -75,7 +73,6 @@ static void gb_connection_kref_release(struct kref *kref) connection = container_of(kref, struct gb_connection, kref); kfree(connection); - mutex_unlock(&connection_mutex); } static void gb_connection_init_name(struct gb_connection *connection) @@ -519,8 +516,7 @@ void gb_connection_destroy(struct gb_connection *connection) ida_simple_remove(id_map, connection->hd_cport_id); connection->hd_cport_id = CPORT_ID_BAD; - kref_put_mutex(&connection->kref, gb_connection_kref_release, - &connection_mutex); + kref_put(&connection->kref, gb_connection_kref_release); } void gb_connection_latency_tag_enable(struct gb_connection *connection) |