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>
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;
{
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;
}