struct ida *ida = &connection->hd->cport_id_map;
int id;
- spin_lock(&connection->hd->cport_id_map_lock);
+ spin_lock_irq(&gb_connections_lock);
id = ida_simple_get(ida, 0, HOST_DEV_CPORT_ID_MAX, GFP_KERNEL);
- spin_unlock(&connection->hd->cport_id_map_lock);
+ spin_unlock_irq(&gb_connections_lock);
if (id < 0)
return false;
{
struct ida *ida = &connection->hd->cport_id_map;
- spin_lock(&connection->hd->cport_id_map_lock);
+ spin_lock_irq(&gb_connections_lock);
ida_simple_remove(ida, connection->hd_cport_id);
- spin_unlock(&connection->hd->cport_id_map_lock);
+ spin_unlock_irq(&gb_connections_lock);
connection->hd_cport_id = CPORT_ID_BAD;
}
INIT_LIST_HEAD(&hd->modules);
INIT_LIST_HEAD(&hd->connections);
ida_init(&hd->cport_id_map);
- spin_lock_init(&hd->cport_id_map_lock);
return hd;
}
struct list_head modules;
struct list_head connections;
struct ida cport_id_map;
- spinlock_t cport_id_map_lock;
u8 device_id;
/* Private data for the host driver */