diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2015-05-14 10:40:02 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-05-14 13:35:10 -0700 |
commit | 5bd5f00c30fa8be047e7905739dcf6ff689718c4 (patch) | |
tree | 719c14ed1d8c88541f04560bf5bb2c3561679788 /drivers/staging/greybus/connection.c | |
parent | 6b17492eee00cbaac20b8431e8fa63f137a9ca5c (diff) | |
download | linux-stable-5bd5f00c30fa8be047e7905739dcf6ff689718c4.tar.gz linux-stable-5bd5f00c30fa8be047e7905739dcf6ff689718c4.tar.bz2 linux-stable-5bd5f00c30fa8be047e7905739dcf6ff689718c4.zip |
greybus: connection: remove lock around ida_simple_* functions
ida_simple_* has a built-in spinlock, no need to grab another lock when
accessing it.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r-- | drivers/staging/greybus/connection.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 5ec161b9b2f2..51d505e7017d 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -63,9 +63,7 @@ static bool gb_connection_hd_cport_id_alloc(struct gb_connection *connection) struct ida *ida = &connection->hd->cport_id_map; int id; - spin_lock_irq(&gb_connections_lock); id = ida_simple_get(ida, 0, HOST_DEV_CPORT_ID_MAX, GFP_ATOMIC); - spin_unlock_irq(&gb_connections_lock); if (id < 0) return false; @@ -81,9 +79,7 @@ static void gb_connection_hd_cport_id_free(struct gb_connection *connection) { struct ida *ida = &connection->hd->cport_id_map; - spin_lock_irq(&gb_connections_lock); ida_simple_remove(ida, connection->hd_cport_id); - spin_unlock_irq(&gb_connections_lock); connection->hd_cport_id = CPORT_ID_BAD; } |