ssize_t buf_len = 0;
int i;
- spin_lock_irqsave(&nvt->nvt_lock, flags);
+ spin_lock_irqsave(&nvt->lock, flags);
fifo_len = nvt_cir_wake_reg_read(nvt, CIR_WAKE_FIFO_COUNT);
fifo_len = min(fifo_len, WAKEUP_MAX_SIZE);
}
buf_len += snprintf(buf + buf_len, PAGE_SIZE - buf_len, "\n");
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
return buf_len;
}
/* hardcode the tolerance to 10% */
tolerance = DIV_ROUND_UP(count, 10);
- spin_lock_irqsave(&nvt->nvt_lock, flags);
+ spin_lock_irqsave(&nvt->lock, flags);
nvt_clear_cir_wake_fifo(nvt);
nvt_cir_wake_reg_write(nvt, count, CIR_WAKE_FIFO_CMP_DEEP);
nvt_cir_wake_reg_write(nvt, config, CIR_WAKE_IRCON);
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
ret = len;
out:
nvt_efm_disable(nvt);
- spin_lock_irqsave(&nvt->nvt_lock, flags);
+ spin_lock_irqsave(&nvt->lock, flags);
nvt_cir_wake_reg_write(nvt, CIR_WAKE_IRCON_MODE0 | CIR_WAKE_IRCON_RXEN |
CIR_WAKE_IRCON_R | CIR_WAKE_IRCON_RXINV |
nvt_cir_wake_reg_write(nvt, 0xff, CIR_WAKE_IRSTS);
nvt_cir_wake_reg_write(nvt, 0, CIR_WAKE_IREN);
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
}
#if 0 /* Currently unused */
-/* rx carrier detect only works in learning mode, must be called w/nvt_lock */
+/* rx carrier detect only works in learning mode, must be called w/lock */
static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt)
{
u32 count, carrier, duration = 0;
u8 iren;
int ret;
- spin_lock_irqsave(&nvt->nvt_lock, flags);
+ spin_lock_irqsave(&nvt->lock, flags);
ret = min((unsigned)(TX_BUF_LEN / sizeof(unsigned)), n);
nvt->tx.buf_count = (ret * sizeof(unsigned));
for (i = 0; i < 9; i++)
nvt_cir_reg_write(nvt, 0x01, CIR_STXFIFO);
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
wait_event(nvt->tx.queue, nvt->tx.tx_state == ST_TX_REQUEST);
- spin_lock_irqsave(&nvt->nvt_lock, flags);
+ spin_lock_irqsave(&nvt->lock, flags);
nvt->tx.tx_state = ST_TX_NONE;
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
/* restore enabled interrupts to prior state */
nvt_cir_reg_write(nvt, iren, CIR_IREN);
nvt_dbg_verbose("%s firing", __func__);
- spin_lock_irqsave(&nvt->nvt_lock, flags);
+ spin_lock_irqsave(&nvt->lock, flags);
/*
* Get IR Status register contents. Write 1 to ack/clear
* logical device is being disabled.
*/
if (status == 0xff && iren == 0xff) {
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
nvt_dbg_verbose("Spurious interrupt detected");
return IRQ_HANDLED;
}
* status bit whether the related interrupt source is enabled
*/
if (!(status & iren)) {
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
nvt_dbg_verbose("%s exiting, IRSTS 0x0", __func__);
return IRQ_NONE;
}
}
}
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
nvt_dbg_verbose("%s done", __func__);
return IRQ_HANDLED;
{
unsigned long flags;
- spin_lock_irqsave(&nvt->nvt_lock, flags);
+ spin_lock_irqsave(&nvt->lock, flags);
/* disable CIR interrupts */
nvt_cir_reg_write(nvt, 0, CIR_IREN);
nvt_clear_cir_fifo(nvt);
nvt_clear_tx_fifo(nvt);
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
/* disable the CIR logical device */
nvt_disable_logical_dev(nvt, LOGICAL_DEV_CIR);
struct nvt_dev *nvt = dev->priv;
unsigned long flags;
- spin_lock_irqsave(&nvt->nvt_lock, flags);
+ spin_lock_irqsave(&nvt->lock, flags);
/* set function enable flags */
nvt_cir_reg_write(nvt, CIR_IRCON_TXEN | CIR_IRCON_RXEN |
/* enable interrupts */
nvt_set_cir_iren(nvt);
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
/* enable the CIR logical device */
nvt_enable_logical_dev(nvt, LOGICAL_DEV_CIR);
nvt->cr_efir = CR_EFIR;
nvt->cr_efdr = CR_EFDR;
- spin_lock_init(&nvt->nvt_lock);
+ spin_lock_init(&nvt->lock);
pnp_set_drvdata(pdev, nvt);
nvt_dbg("%s called", __func__);
- spin_lock_irqsave(&nvt->nvt_lock, flags);
+ spin_lock_irqsave(&nvt->lock, flags);
nvt->tx.tx_state = ST_TX_NONE;
/* disable all CIR interrupts */
nvt_cir_reg_write(nvt, 0, CIR_IREN);
- spin_unlock_irqrestore(&nvt->nvt_lock, flags);
+ spin_unlock_irqrestore(&nvt->lock, flags);
/* disable cir logical dev */
nvt_disable_logical_dev(nvt, LOGICAL_DEV_CIR);