/* Try to load the module needed */
if (!reg && capable(CAP_SYS_MODULE)) {
spin_unlock(&dongles->hb_spinlock);
/* Try to load the module needed */
if (!reg && capable(CAP_SYS_MODULE)) {
spin_unlock(&dongles->hb_spinlock);
spin_lock(&dongles->hb_spinlock);
reg = hashbin_find(dongles, type, NULL);
}
spin_lock(&dongles->hb_spinlock);
reg = hashbin_find(dongles, type, NULL);
}
spin_lock(&dongles->hb_spinlock);
/* Check if this dongle has been registered before */
if (hashbin_find(dongles, new->type, NULL)) {
spin_lock(&dongles->hb_spinlock);
/* Check if this dongle has been registered before */
if (hashbin_find(dongles, new->type, NULL)) {
/* Insert IrDA dongle into hashbin */
hashbin_insert(dongles, (irda_queue_t *) new, new->type, NULL);
}
spin_unlock(&dongles->hb_spinlock);
/* Insert IrDA dongle into hashbin */
hashbin_insert(dongles, (irda_queue_t *) new, new->type, NULL);
}
spin_unlock(&dongles->hb_spinlock);
spin_lock(&dongles->hb_spinlock);
node = hashbin_remove(dongles, dongle->type, NULL);
spin_lock(&dongles->hb_spinlock);
node = hashbin_remove(dongles, dongle->type, NULL);
IRDA_ERROR("%s: dongle not found!\n", __FUNCTION__);
spin_unlock(&dongles->hb_spinlock);
}
IRDA_ERROR("%s: dongle not found!\n", __FUNCTION__);
spin_unlock(&dongles->hb_spinlock);
}